Facebook Stream Publish while offline

前端 未结 4 1052
梦毁少年i
梦毁少年i 2021-02-04 22:05

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?

Thanks,
Tee

4条回答
  •  无人及你
    2021-02-04 22:49

    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 With this permission, you can publish content to a user's feed at any time, without requiring offline_access.

    To do this, you need to first retrieve your app's access token by calling this API:

    GET URL https://graph.facebook.com/oauth/access_token?client_id={app_id}&client_secret={app_secret}&grant_type=client_credentials

    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

提交回复
热议问题