0

Per Fb's Graph API: https://developers.facebook.com/docs/pages/publishing

I'm trying to follow the same POST API call :

CURL POST https://graph.facebook.com/{page_id}/feed?published=false
&message=An unpublished post&access_token=your-page-access-token

But it seems that the "published=false" is getting ignored for my page access token.

When I get all my feeds using GET {page_id}feed/ -> The un-published feed gets returned(which per documentation shouldn't have been returned).

Any thoughts on what could be going wrong?

rishabh
  • 1,155
  • 1
  • 10
  • 17
  • Why shouldn't you get un-published posts back? – WizKid Jul 20 '18 at 22:50
  • Per the Graph API documentation: The /feed API only returns published feeds, and un-published feeds are available under /promotable_posts. https://developers.facebook.com/docs/graph-api/reference/v3.0/page/feed – rishabh Jul 20 '18 at 23:32

1 Answers1

0

This post helped me a lot: Facebook Access Token for Pages

Essentially, to be able to make an un-published post, you must use the page's access token. Using your app's access token, the API returns a success, however the post is always considered as "published".

Secondly, in order to retrieve the un-published post using /promotable_posts API, your page must be live. I tested with a live v/s not live page to confirm this.

rishabh
  • 1,155
  • 1
  • 10
  • 17