我需要“offline_access”如果我要求publish_stream的权限? [英] Do I need "offline_access" permission if I request publish_stream?

查看:95
本文介绍了我需要“offline_access”如果我要求publish_stream的权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于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,不需要
,需要offline_access

要在短期令牌过期后发布到用户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的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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