php - How to get facebook page posts on website -


Hello, I have a Facebook page (there is no app), and I want to get a recent post on my website on PHP.

I do not know where to start, I used Google to look at it but I had to find out how to get the post from the app.

Its a very comprehensive question anyway, follow these steps -

  1. If you are not registered as a Facebook Developer, register here:

  2. Then, create an app from here: < / li>

  3. App Access Token ( app-id | app-write ) in your PHP copy script - this is required because a page To get a post from (public), you need a valid login token.

  4. Get content using curl or file_get_contents of the url:

      Https://graph.facebook.com/ {Page-id / page-username} / posts? Access_token = {App (you can see the result by browsing the URL in a browser) Just pars the JSON and get the post as needed. You will not receive all the posts at one time, but as a result you will find the URL on the next page.  

    Hope that helps!

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -