Issue with Facebook JS API, revokeAuthorization
Posted
by BBonifield
on Stack Overflow
See other posts from Stack Overflow
or by BBonifield
Published on 2010-04-15T20:58:54Z
Indexed on
2010/04/15
21:13 UTC
Read the original article
Hit count: 369
I am trying to integrate FB connect into our user profile screen. Although, I'm having an issue with FB.ApiClient.revokeAuthorization.
The basic problem is that I revoke the auth at line 44 after the user clicks the disconnect button.
After that, all subsequent API calls don't have a valid session to even check user status. I've tried wrapping blocks in a FB.Connect.forceSessionRefresh block, but then the code will never be called at all.
I'm not sure what the proper workflow should be for this purpose. Right now it's basically...
- User arrives at profile NOT connected to the application.
- User clicks on the connect button.
- Once connected, DOM manipulation occurs to hide the connect button and add in a disconnect button.
- User clicks on the disconnect button.
- User's authorization to the application is revoked and (it seems) the API session to the FB server is invalidated.
- DOM manipulation occurs to hide the disconnect button and readd the connect button.
- User clicks on the connect button.
- Once connected, the FB.Connect.get_loggedInUser() don't return the actual user.
© Stack Overflow or respective owner