Facebook graph api Public page data - facebook-graph-api

I am stuck in fetching data for a public Facebook page. I want to know which endpoint of graph api should I use to fetch the page data and how. Will anybody please help. I have tried to make a get request for public page content access

you don't need a special endpoint, you just have to use the id of the page when making the call, in the same way you do with a user profile.
but in order to make a call to a public page, you need your app to be reviewed and approved by the Facebook team.

Related

Test Facebook Graph API without Page Public Content Access permission

Is there a way to test an app implemented Facebook Graph API required Page Public Content Access permission?
I was testing the {page_id}_{post_id} endpoint in Facebook Graph API Explorer to get a post, but got the error message:
This endpoint requires the 'pages_read_engagement' permission or the 'Page Public Content Access' feature. Refer to https://developers.facebook.com/docs/apps/review/login-permissions#manage-pages and https://developers.facebook.com/docs/apps/review/feature#reference-PAGES_ACCESS for details.
This error applies to both random pages and pages that I own. I couldn't use it at all. The app I've planned to do is mostly based on Facebook posts so I may say this is it's the main function, so I just can't have the app reviewed until I can test this endpoint successfully.
What can I do to make it work? Any help would be appreciated!
It turns out I chose the wrong type to create my facebook app. I chose to create a "Business Connected Experiences" app instead of a "Manage Business Integrations" one, so I couldn't fully access to the permissions I need to query on my own page. The former only doesn't provide me the pages_user_read_content and the likes, so it was unable for me to read comments from posts. Besides, I also use an user token instead of a page token (Thanks Lars for pointing this out for me).
So, I just create a new app with the right type and everything turns out well.
Hope this will help someone someday.

Facebook Page Public Access Content permission: competitive analysis and benchmarking only?

I would like to write a backend application that retrieves public posts from Facebook pages that I don't manage, using the graph API. As an example the last 5 posts of the local pub page.
According to the feed documentation, I need to manage the page or request the Page Public Content Access permission.
The Page Public Content Access permission is mentioning the following as allowed usage: 'Provide aggregated, anonymized public content for competitive analysis and benchmarking'.
This sounds very restricted to me.
Is it possible and allowed to let my backend application retrieve public Facebook posts and show them in my mobile application as feature?
Most references on StackOverflow refer to issues that are related to API changes that have been made.
I'm trying to understand what is allowed and what not but it is hard for me to extract this from the documentation on the developers page.

Retrieve comments from an implementing facebook comments website

I can not get Facebook Graph Api to retrieve comments from websites that implements facebook commenting system.
I want to provide sentiment feedback statistics for various websites. I wanted to retrieve comments from few websites which are implementing facebook commenting system, I found graph API method /{object-id}/comments
which should return set of comments from specific object-id (which is an url of article consisting set of facebook comments?). I keep getting json response with ID only or an error with "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review." message. Any feedback on that?
/{object-id}/comments is for objects on Facebook - posts, comments, videos, etc. An external website that uses the comments plugin, doesn’t fall under that to begin with.
What you want, is this here - https://developers.facebook.com/docs/plugins/faqs#faq_1603507626630008:
Can I get comments for a URL via an API?
The comments for every URL can be accessed via the Graph API. Simply make an HTTP GET request to:
https://graph.facebook.com/v2.6/?fields=og_object{comments}&id=<YOUR_URL>&access_token=<YOUR_TOKEN>

Is there any way to get public event informations from Facebook?

I know since Cambridge Analytica facebook API has suspended some endpoints. But I need facebook public events informations for a project. The informations I need are:
Event Name
Date and Time
Cover photo
Description
Event URL
Address
Event ID
Page ID
I'm doing a project for a client. It will request those data from server side and save it in database. Then it will show available events in a community website for specific locations. We don't need data about attendee list or their post on the wall. My client is willing to go through app review process. Question is does Facebook sdk provide those informations? Reading the documentation, my understanding is it only provide event informations that are attended by me or created in a page in which I'm an admin.
Is there any way to get these information? Let me be clear, I'm talking about public events. Not the one created by me or by my page.
Thank you in advance.
Just to be 100% sure, I just tried to access events of a Page I don´t own, with a live App that has Page Public Content Access approved, and did not get the events. (Tested with the /page-id/events endpoint.)
The docs tell you that accessing Page events is not possible in any case:
This is a restricted edge. You cannot request access at this time.
Source: https://developers.facebook.com/docs/graph-api/reference/page/events/

Why are Facebook Graph API permissions so weird?

I have created a Facebook page. On the page I have created some events and some notes. Everything as public as possible. Now I want to expose the data on my website using the Graph API.
The general data of the page is accessable without any access token, which is nice.
The event data is accessable using a FB app with app_id and app_secret.
For the notes you need a "user access token", which isn't an option, because not all of the website visitors have a FB account.
Why must it be so complicated? Does anyone have a solution?
Greetings
Allan