Facebook Access Token [Javascript SDK]

后端 未结 1 1637
谎友^
谎友^ 2021-01-26 16:35

I am writing Facebook login for my site.I am using Javascript Sdk,but I don\'t understand one thing.

  function fbLogin() {
   FB.login(function(response) {
   i         


        
相关标签:
1条回答
  • 2021-01-26 16:42

    Can I trust he access token(response.authResponse.accessToken) for identify the user?

    Of-course yes!

    Can Facebook change the access token ?

    Nope. But it expires after 2 hours, so you have to get the token again. If you want to use this token in future; you can extend the life of the token to 60 days.

    You can read more about access tokens here.


    [Edit]

    The token also becomes invalidated in the following cases-

    • User changes the password
    • User de-authorizes the app
    • User removes the app
    0 讨论(0)
提交回复
热议问题