Facebook Graph API 服务器端身份验证(无客户端)
所以我存储了“access_token”并将其标记为“offline_access”。一切都很好。现在,我想做的是:我希望 PHP 页面“刷新”/每分钟执行一次,然后使用我存储的令牌(我想随时手动更改,例如从数据库中的字段) ),然后更改用户的状态。假设我有 3 个 Facebook 帐户的代币。
我知道如何发帖以及所有这些,但是当我在没有会话的情况下尝试它时,它告诉我需要创建一个会话来执行此操作。然而,这是服务器端的。如果没有在服务器端看到 Facebook 的“登录”按钮,我不知道如何进行会话。
如何做到这一点?关于如何使我的 PHP 页面在执行时从 Facebook PHP 类创建一个新的 Facebook 对象,然后插入任何访问令牌和 UID,然后发布到用户的墙上,有什么想法吗?
谢谢!
So I have stored the "access_token" and marked it as "offline_access". All that is fine. Now, what I am trying to do is: I want a PHP page to "refresh"/be executed every minute, and then use that token that I stored (which I want to change at anytime manually, say from a field in the database) and then change the status of the user. Say I have the tokens for 3 of my facebook accounts.
I know how to post and all that, but when I try it without a session, it is telling me I need to create a session to do it. However, this is server-side. I don't know how to do the session without seeing the "login" button of Facebook on the server side.
How to do this? Any thoughts on how to make my PHP page, when executed, create a new Facebook object from the Facebook PHP class, and then plug in the whatever Access Token and UID maybe, and then post to the wall of the user?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里回答:
Facebook 离线访问分步
Answered here:
Facebook offline access step-by-step