对于 Facebook,我请求了电子邮件和publish_stream。
我得到了他们的access_token。耶!
现在......当我尝试向他们的墙(/feed)发送帖子时,我收到以下消息:
{"error":{"type":"OAuthException","message":"Error validating access token: Session has expired at unix time 1315342800. The current unix time is 1315363038."}}
为什么?我需要离线访问吗?
最佳答案
没有。来自 Facebook 的 documentation :
Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends. With this permission, you can publish content to a user's feed at any time, without requiring offline_access.
要在短期 token 过期后发布到用户源,请按以下格式发送访问 token :
appid|appsecret
此 token 格式取自 PHP SDK 源代码。在这种情况下,您将无法使用/me/feed,因此您需要 POST 到/userid/feed
关于facebook-graph-api - 如果我请求publish_stream,是否需要 "offline_access"权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7328342/