Facebook API issue, authorization revocation

I am trying to integrate an FB connection into the screen of our user profile. Although, I have a problem with FB.ApiClient.revokeAuthorization.

http://pastie.org/921942

The main problem is that I cancel auth on line 44 after the user presses the disconnect button.

After that, all subsequent API calls do not have a valid session to check the status of the user. I tried blocking blocks in a FB.Connect.forceSessionRefresh block, but then the code will never be called at all.

I am not sure what the appropriate workflow should be for this purpose. Right now this is basically ...

  • The user comes to the NOT profile connected to the application.
  • The user clicks the connect button.
  • After connecting, DOM manipulation occurs to hide the connect button and add a disconnect button.
  • User clicks on the disable button.
  • User permission for the application is revoked and (it looks like) the API session for the FB server is invalid.
  • DOM manipulation is performed to hide the disable button and read connect.
  • The user clicks the connect button.
  • After connecting FB.Connect.get_loggedInUser () does not return the actual user.
+3
source share
1 answer

facebook api $facebook->logout(). $facebook->logout(), "LOGOUT", , , .

- FB JS onClick FB.logout(function(response){ window.location = 'redirecturl'});

+1

Source: https://habr.com/ru/post/1741349/


All Articles