如何检查用户是否使用其access_token和graph API登录到Facebook [英] How to check if a user is logged into facebook using his access_token and graph api

查看:108
本文介绍了如何检查用户是否使用其access_token和graph API登录到Facebook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆