Search code examples
facebookfacebook-graph-apifacebook-page

How to star a post on a facebook fanpage using graph api?


I'm posting on my fanpage but i want to do highlight posts. Any suggestions?

I have to star them one by one on the fanpage. Is there any way to do this? I also read the documentation but there is no examples.

http://developers.facebook.com/docs/reference/api/page/#posts

Sample of code:

  $args = array(
      'access_token'  => $page_info['access_token'],
      'message'       => 'MY MESSAGE'
  );

  $post_id = $facebook->api("/MY PAGE ID/feed","post",$args);

Im using PHP SDK 3.1.x.


Solution

  • Use:

    POST /<post_id>/ with param timeline_visibility = starred
    

    timeline_visibility must be one of the following values: hidden, normal, starred.

    Also see https://stackoverflow.com/a/19861323/1784062.