Facebook Stream Publish while offline

前端 未结 4 1054
梦毁少年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:37

    yes facebook allow you to publish offline just take the offline_access permission from the user and when he/she is going to use you application , then user need not to be login on facebook to publish . please refer this :

    http://developers.facebook.com/docs/authentication/permissions

    0 讨论(0)
  • 2021-02-04 22:42

    offline_access is no longer used in facebook, the new way is the Expiration Time of the TOKEN through New Endpoint read more at https://developers.facebook.com/roadmap/offline-access-removal/

    0 讨论(0)
  • 2021-02-04 22:45

    Just in case anyone stumbles on this looking for a solution using PHP. Using the PHP API, I ended up with this working for me, with help from the FB docs here:

    http://developers.facebook.com/docs/reference/php/facebook-api/

    Note that $users_facebook_id is the Facebook ID of a user who has granted your app permissions with the "publish_stream" permission.

    $access_token = $facebook->getAccessToken();
    
    $ret_obj = $facebook->api('/'.$users_facebook_id.'/feed', 'POST',
                                        array(
                                       'link' => 'http://www.website.com',
                                       'message' => 'Testing'
                                      ));
    
    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题