Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph API to get public post of the public page

I want to access the public post of the public page in php script. Is there any feasibility to get this data from facebook pages. I have checked the documentation and found out as below url.

https://developers.facebook.com/docs/pages/access-tokens

Here it is providing the access to the pages which are created by me but not for the other user pages. So how can i get access to other user's pages post.

Any help will be appreciate.

like image 240
Yogendrasinh Avatar asked Mar 15 '19 05:03

Yogendrasinh


People also ask

How do I get Facebook posts on api?

Your app needs user_posts permission from the person who created the post or the person tagged in the post. Then your app can read: Timeline posts from the person who gave you the permission. The posts that other people made on that person Timeline.

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 get Facebook Page Insights on graph api?

You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.

Does Facebook have a public api?

With the Facebook API, you can access and read public data for Facebook Pages that you are not the admin of. This data, including business metadata, public comments, and posts, can be used for competitive analysis and benchmarking.


1 Answers

You have to apply for "Page Public Content Access": https://developers.facebook.com/docs/apps/review/feature/#reference-PAGES_ACCESS

After approval, you can just use the same API call as for your own pages (/page-id/feed) with any Access Token: https://developers.facebook.com/docs/graph-api/reference/v3.2/page/feed

like image 137
andyrandy Avatar answered Sep 19 '22 07:09

andyrandy