如何实现Facebook图形API的注销功能 [英] How to implement Logout functionality for Facebook graph API
问题描述
你是如何登录到Facebook的首先?如果您正在使用Facebook iOS SDK,您基本上必须调用 [facebook logout:self];
。否则,如果您自己实现Graph API,您只需要清除您的Cookie并删除您的访问令牌。
I implemented Facebook Graph API in my iPhone App and I successfully post it in a wall. But each time I end my application and come back it stores my credentials (in Safari I guess as a cookie). It asks my permission with my previous credentials. But at this point I want my Facebook API should prompt for a new username and password login for requesting permission. In simple I want to logout of my Facebook when i select a button in my App.
How did you log in to facebook in the first place? If you are using facebook iOS SDK, you just basically have to call [facebook logout:self];
. Otherwise if you're implementing Graph API yourself you just need to clear out your cookies and delete your access token.
这篇关于如何实现Facebook图形API的注销功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!