如何将 Facebook 取消授权回调与 Facebook Javascript SDK 同步
我正在使用 Facebook Python 和 Javascript SDK。并设置一个取消授权回调 URL,以便在用户取消对应用程序的授权时接受来自 Facebook 的 POST。
当我收到 Facebook 发来的 POST 时,我将用户设置为非活动状态,并且不会将其登录到该网站。然而,这使得 fb:login-button 不同步。它不显示用户数据(因为我将空用户传递给模板),但正在显示注销按钮。我认为是因为它从 fb Cookie 获取用户状态。
显然我需要做一些额外的清理,所以我的问题是如何清理登录按钮中的状态?
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 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解了这个问题:
尝试使用类似的方法检查用户授权: http://developers.facebook .com/docs/reference/javascript/FB.getLoginStatus/
然后用你的按钮做任何你想做的事......
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...