skip to Main Content

I am trying to make a simple webpage that will just display the most recent, let’s say 5, posts from a certain facebook page. I have tried so many ways to use the Facebook API, but no matter what I do, it either returns nothing, or I get an access denied message. I am an admin of the page.

What is the best way to do this with PHP? If there is no other way to get facebook posts, what is the best way to use the API?

I would also like to get the post URL, not the contents of the post.

2

Answers


  1. Chosen as BEST ANSWER

    I found a way using zapier.com. Thanks!


  2. First, you need to get either the user/page access token. Then, you will be able to get the last 5 posts using: https://graph.facebook.com/{YOUR_PAGE_ID}/posts?access_token={YOUR_ACCESS_TOKEN}&limit=5

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search