Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook - posting scheduled posts on pages via Graph API

I've already read the facebook documentation which isn't quite clear. My question is, just like a page admin can manually add scheduled posts on their page, can my app, with the right access token, do the same? I've already tried using POST requests to set a 'created_time' on a future date but it just posts immediately.

like image 519
Peeyush Kushwaha Avatar asked Apr 03 '13 21:04

Peeyush Kushwaha


People also ask

Can you schedule FB posts to a page?

If you don't want to publish your post right away, click on the arrow next to the Publish button at the bottom of the page. Then, choose the day you want the post to be published, and the time it should go live. Finally, click Save. Click the blue Schedule Post button, and that's it!

How do I share a Facebook post on a graph API?

Yes, you can share using the graph2 api. The way you do it is to use /feed edge and pass the post's url that you want to share as the link. Standard Fb permissions to the post you are sharing do apply. This was done today, in a local rails app, using FbGraph2 gem, with the above method.

How do I schedule Facebook posts in bulk?

To schedule posts to a Facebook group, open your group page in a new window and paste the comment and link into a new post. To schedule it, click the clock icon next to the blue Post button. Then choose your date and time and click Schedule. It's that easy — and it's free!


2 Answers

Yes, use the scheduled_publish_time parameter when creating the post - this parameter is mentioned in the documentation you linked in multiple sections, where the parameters accepted when creating posts are listed, for example, in the 'Status Update' section: https://developers.facebook.com/docs/reference/api/page/#statuses

Its value should be UNIX timestamp according to the documentation, though in many places in the Facebook API you can also use any date which is parseable by PHP's strtotime function so try that too.

Time when the page post should go live, this should be between 10 mins and 6 months from the time of publishing the post.

If you can't get this to work when specifying published to false, try setting it to 'true' at creation time

like image 115
Igy Avatar answered Sep 22 '22 01:09

Igy


Contributing to the last answer (i'm not allowed to comment). If you are trying to get the schedules post, you should use /{page-id}/promotable_posts. See https://developers.facebook.com/docs/graph-api/reference/page/feed/ for further details.

like image 45
Nicolas Cisco Avatar answered Sep 19 '22 01:09

Nicolas Cisco