如何检查用户是否使用其access_token和graph API登录到Facebook [英] How to check if a user is logged into facebook using his access_token and graph api
问题描述
我有一个Facebook iframe应用程序. 我正在使用图形API向服务器端的facebook发出请求. 我具有离线访问权限,因此access_token永不过期.
我想知道当前用户是否已登录Facebook,所以当他注销Facebook时,我可以将其注销我的应用程序. 我不想使用javascript sdk.
我尝试使用用户表的online_presence字段,但始终返回null. 我有什么办法可以做到这一点?
有更好的方法吗?
您需要另一个权限user_online_presence. 从Facebook开发人员页面的权限列表中获取: http://developers.facebook.com/docs/authentication/permissions/ >
I have a facebook iframe application. I am doing my requests to facebook on server side using the graph api. I have offline access so the access_token never expires.
I would like to know if the current user is logged into facebook so when he logs out of facebook i can log him out of my application. I do not want to use the javascript sdk.
I have tried using the online_presence field of the user table but that always returns null. Is there any way i can do this?
Is there a better way about it?
You need another permission, user_online_presence. Taken from the permissions list in the Facebook dev pages: http://developers.facebook.com/docs/authentication/permissions/
这篇关于如何检查用户是否使用其access_token和graph API登录到Facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!