且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用NodeJS获取Facebook用户访问令牌

更新时间:2023-12-01 20:57:58

一种简单的方法:

  • Use the JavaScript SDK: https://developers.facebook.com/docs/javascript/
  • After getting a User Token with FB.login, transfer the Token to the server with AJAX and use it on the server - either with some SDK, or with axios/fetch/whatever.

或者,您可以建立自己的登录流程:

Alternatively, you can build your own login flow: https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/