iPhone 应用程序中的 Facebook 注销
我已将 facebook 集成到我的应用程序中,从 FB 我将获取用户 ID 和用户名,并将其传递给我自己的服务,该服务将进行验证并允许相应的用户进入系统。我从 FB 获取了用户 ID 和用户名,并将其传递给我的服务来进行验证,它允许用户进入应用程序,但我的问题是一旦我登录,我如何从 FB 注销?
请让我知道你的想法。
谢谢
I have integrated the facebook in to my application, From the FB i will be getting the userid and the name of the user and passing it to my own service that will do the validation and allows the respective user to get in to the system. I have got the userid and username from the FB and passed it my service that will do the validation,it allows the user to enter in to app, but my problem is once i logged in , how can i log out from the FB ?
Please let me know your ideas.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您使用新的 facebook sdk,那么我们
[Facebook 注销:代表]
作为 facebook 你的 Facebook 对象,并委托一个 FBSessionDelegate。
如果一切顺利,您的委托将被调用 -(void)fbDidLogout;
If you are using the new facebook sdk, then us
[facebook logout:delegate]
Being facebook your Facebook object,and delegate an FBSessionDelegate.
If all goes well your delegate will be called on -(void)fbDidLogout;
这取决于您使用哪个库来连接到 Facebook。
但我猜你有一个
FBSession
类,它有一个logout
方法...该
logout
方法还调用deleteFacebookCookies
您也可以根据您的需要直接致电...希望有帮助。
That depends on which library you use to connect to facebook.
But I guess that you have a
FBSession
class that has alogout
method...That
logout
method also callsdeleteFacebookCookies
that you could also directly call depending on your needs...Hope that helps.
如果您使用旧的 facebook sdk,则使用此代码进行 logout.make FBSession 类对象和类似的代码。 [FBSession类对象注销];
它将删除所有 FacebookCookie。
If you are using old facebook sdk,then use this code for logout.make FBSession class object and code like this. [FBSessionclassobject logout];
it will delete all FacebookCookies.