Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Yefferson's avatar

How to auto post to facebook page?

Here is the thing: I have a blog article. I want to automatically post it to my facebook page as soon as my article gets created. Any idea of how to achieve that?

Thank you,

0 likes
3 replies
azimidev's avatar

You don't need any SDK in order to post to you page. Head over here : https://developers.facebook.com/docs/pages/publishing

You will need a few things:

  • FACEBOOK_PAGE_TOKEN
  • FACEBOOK_PAGE_ID (this can be found if you go to your page and click on about and scroll all the way to the bottom) (or you can paste your page URL here: https://findmyfbid.com/)
  • Guzzle HTTP or Adam's Zttp

There is a very nice Facebook tool called Graph API Explorer here you get find everything and how to access your tokens and post to your https://developers.facebook.com/tools/explorer/

Then you hit a POST request here:

https://graph.facebook.com/v2.11/<YOUR_PAGE_ID>/feed?access_token=<YOUR_PAGE_ACCESS_TOKEN>&message=<YOUR_MESSAGE>&link=<YOUR_LINK>
4 likes

Please or to participate in this conversation.