首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >使用PHP获取FB的访问令牌

使用PHP获取FB的访问令牌
EN

Stack Overflow用户
提问于 2015-07-28 05:25:30
回答 1查看 831关注 0票数 0

我正在尝试获得一个FB访问令牌,以获取用户的事件。同样,我也找不到使用REST的解决方案。看起来所有的FB使用都是Graph API。

https://developers.facebook.com/tools/explorer/上的工具能够给我一个令牌,但它的有效期很短,几个小时后就会过期。我需要一些东西,将停留时间更长,与最少的用户互动。如果需要,零交互(可能是从cookies中获取FB会话详细信息并继续)

我可能想要避免的事情:1.FB PHP SDK 2.FB应用程序权限对话框,因为使用案例将是一个chrome扩展,我不确定FB是否可以从Chrome extns调用对话框。

我如下所示:https://www.sammyk.me/access-token-handling-best-practices-in-facebook-php-sdk-v4,但正如我所提到的,我不想使用SDK,这就是我们正在使用的。

EN

回答 1

Stack Overflow用户

发布于 2015-07-28 05:46:10

你是说这个吗?

graph.facebook.com/me/events?method=get&access_token={usertoken}

如果您正在寻找接受该权限的访问令牌,则可以使用HTC app权限。

https://www.facebook.com/v1.0/dialog/oauth?redirect_uri=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&scope=email%2Cpublish_actions%2Cuser_about_me%2Cuser_actions.books%2Cuser_actions.music%2Cuser_actions.news%2Cuser_actions.video%2Cuser_activities%2Cuser_birthday%2Cuser_education_history%2Cuser_events%2Cuser_games_activity%2Cuser_groups%2Cuser_hometown%2Cuser_interests%2Cuser_likes%2Cuser_location%2Cuser_notes%2Cuser_photos%2Cuser_questions%2Cuser_relationship_details%2Cuser_relationships%2Cuser_religion_politics%2Cuser_status%2Cuser_subscriptions%2Cuser_videos%2Cuser_website%2Cuser_work_history%2Cfriends_about_me%2Cfriends_actions.books%2Cfriends_actions.music%2Cfriends_actions.news%2Cfriends_actions.video%2Cfriends_activities%2Cfriends_birthday%2Cfriends_education_history%2Cfriends_events%2Cfriends_games_activity%2Cfriends_groups%2Cfriends_hometown%2Cfriends_interests%2Cfriends_likes%2Cfriends_location%2Cfriends_notes%2Cfriends_photos%2Cfriends_questions%2Cfriends_relationship_details%2Cfriends_relationships%2Cfriends_religion_politics%2Cfriends_status%2Cfriends_subscriptions%2Cfriends_videos%2Cfriends_website%2Cfriends_work_history%2Cads_management%2Ccreate_event%2Ccreate_note%2Cexport_stream%2Cfriends_online_presence%2Cmanage_friendlists%2Cmanage_notifications%2Cmanage_pages%2Cphoto_upload%2Cpublish_stream%2Cread_friendlists%2Cread_insights%2Cread_mailbox%2Cread_page_mailboxes%2Cread_requests%2Cread_stream%2Crsvp_event%2Cshare_item%2Csms%2Cstatus_update%2Cuser_online_presence%2Cvideo_upload%2Cxmpp_login&response_type=token&client_id=41158896424

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31663588

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档