离线时Facebook流发布 [英] Facebook Stream Publish while offline
问题描述
如果我具有Facebook应用程序的publish_stream扩展权限,这是否允许我的应用程序在离线状态下在Feed上进行书写?
If I have the publish_stream extended permission for a Facebook app, does that allow my app to write on my feed while I'm offline?
谢谢,
三通
推荐答案
只要拥有publish_stream权限,就不需要offline_access权限即可将其发布到用户的供稿中.这是 Facebook的文档
You don't need the offline_access permission to post to a user's feed, so long as you have the publish_stream permission. Here's an excerpt from the "publish_stream" section of Facebook's Doc :
publish_stream 拥有此权限,您可以随时将内容发布到用户的供稿中,而无需offline_access.
publish_stream With this permission, you can publish content to a user's feed at any time, without requiring offline_access.
为此,您需要先通过调用以下API来检索应用的访问令牌:
To do this, you need to first retrieve your app's access token by calling this API:
获取URL https://graph.facebook.com/oauth/access_token?client_id={app_id}&client_secret={app_secret}&grant_type=client_credentials
一旦您拥有应用程序access_token,就可以发布到用户的供稿中:
Once you have the app access_token, you can post to the user's feed:
POST URL https://graph.facebook.com/{user_id}/feed
POST BODY (身体) access_token={app_access_token}&message=Hello
这篇关于离线时Facebook流发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!