问题描述
对于Facebook,我请求了电子邮件和publish_stream 。
For Facebook, I requested email and publish_stream.
我有他们的access_token。 yay!
I got their access_token. yay!
现在....当我尝试发送POST到他们的墙上(/ feed),我收到这个消息:
Now....when I try to send a POST to their wall (/feed), I get this message:
{"error":{"type":"OAuthException","message":"Error validating access token: Session has expired at unix time 1315342800. The current unix time is 1315363038."}}
为什么?我需要offline_access吗?
Why? Do I need offline_access?
推荐答案
否。从Facebook的:
No. From Facebook's documentation:
要在短期令牌过期后发布到用户Feed,请以以下格式发送访问令牌:
To publish to the users feed after their short lived token expires, send over an access token in this format:
appid|appsecret
此标记格式取自PHP SDK源代码。在这种情况下,您将无法使用/ me / feed,因此您需要POST到/ userid / feed
This token format is taken from the PHP SDK source code. In this case you won't be able to use /me/feed so you would need to POST to /userid/feed
这篇关于我需要“offline_access”如果我要求publish_stream的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!