How to synch Facebook deauthorization callback with Facebook Javascript SDK
I'm using the Facebook Python and Javascript SDKs. And have a deauthorization callback url set up to accept POSTs from Facebook in the event a User deauthorizes the 开发者_JAVA技巧applicaiton.
When I receive the POST from Facebook, I set the User to inactive, and will not log them into the site. However this leaves fb:login-button out of synch. It doesn't show the User data (because I am passing a null User to the template), but a logout button is being displayed. I assume because it is getting the user state from the fb Cookie.
There's obviously some additional clean up I need to do, and so my question is how do I clean up state in the login-button?
If i understood the problem correctly: Try to check the user authorization using something like that: http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/ And then do with your buttons whatever you want...
精彩评论