Get public posts of public group - facebook-graph-api

I have the app in development, where I want to show facebook group public posts ( https://www.facebook.com/Microsoft/ ). I'm not a group admin :) . When I tried to access posts by graph api, i've got the
(#100) Pages Public Content Access requires either app secret proof or an app token
error message.
And I cannot request access to "Pages Public Content" (cannot pass verification).
what permission can I request to read group public posts?

The Facebook API works like this,
Development Mode: For development mode you can try to access data/posts from group which is associated with the account in which app created. So, that group and posts associated in that group can be accessible. You can try following link,
https://developers.facebook.com/docs/graph-api/reference/v5.0/group/feed
Live mode: In case of live mode you need to create a video of snapshot using your development mode functionality and get "Pages Public Content Access" permission approved. Then you can access the public post associated with public groups.

Related

How can I get posts from public pages with Graph API?

I have Graph API Facebook. As shown as when I get my Posts that work. but when I get public page that not wok and get error (#100) Pages Public Content Access requires either app secret proof or an app token. I generate token with all permissions but not work.
My posts(worked):
JasonStatham posts(not work):
You can do this via official GraphQL QPI, in specific the /page-post endpoint.
There is also a good example here of how to do that with Python.
However, you need to keep in mind that in order to use this API you need to have a Facebook Application with 'Page Public Content Access'.
To get that permission your app must be a verified Business app.

Get public facebook pages feed via graph api

I want to get my hands dirty with code and start working on some small projects, so I decided to work on a facebook scraper that pulls feed from a public page and sends results via email.
when I try the URL : https://graph.facebook.com/page_id/posts?access_token=APP_TOKEN, I'm getting " This endpoint requires the 'manage_pages' permission or the 'Page Public Content Access' feature.
What am I missing?!
Thank you <3
In order to pull the feed with the Graph API, you need to:
Manage the Page, and use a Page Token of that Page to get the feed
or apply for Page Public Content Access, if you do not manage/own the Page

Pulling Public Account Information Using FB API

I am trying to pull information(name, posts, email, etc) of arbitrary public Facebook accounts. I have a Facebook App. However, I am unable to pull anyone's data because there is no "universal access token" that would allow me access every public account's data.
To test the app, I made a dummy Facebook account and gave that account a developer role in the app. Based on Facebook documentation, since my app is in development mode and the dummy account has a role in the app, I should be able to pull its data. Even with an access token where all of the boxes are enabled, I am still unable to access this data.
Suppose 123456789 is the Facebook id of account I am trying to get info from
Get request from admin account - GET/v3.3/123456789?fields=posts
I expected to get a list of all of the posts from the user; however, I get:
{
"id": "123456789"
}
Is it still possible to pull public account data through Facebook? I know that to do so in live mode, I will need to get Facebook to approve a Page Public Content Access feature, but I am unable to get to that point, because I cannot access public posts in development mode.
If this is about User Profiles:
It is not possible to get ANY data of a user without his explicit permission. You donĀ“t even get an ID of the user without him authorizing your App first. For accessing his posts, you would even need an additional permission (user_posts). For accessing his email, you would need the email permission.
If this is about Pages:
You need to apply for Page Public Content Access in order to get access to posts of Pages.

How to generate correct access token when my app already has Page Public Content Access

Our team is creating an app that analyzes Facebook reviews/recommendations. We have submitted an initial version of the app to FB for approval to use Page Public Content Access (PPCA), and have been approved. However when we started testing it after approval and after going to Live mode, we have not been able to generate any tokens that enable us to access the public content we are looking for.
There was a similar question posted recently, 54943575/facebook-graph-api-review-rating-data-with-page-public-content-access. However the answers that appeared for that one said that you can't access this content without manage_pages permission for each individual page, while the FB documentation clearly says you can do so with the Page Public Content Access: "Allows read-only access to public data on Pages for which you lack the manage_page login permission. Readable data includes business metadata, public comments, posts, and reviews." It is true that you need manage_pages in order to write, e.g. delete or post, content to any pages. The documentation also says that with PPCA permission, an allowed use is "Provide aggregated, anonymized public content for competitive analysis and benchmarking", for which clearly you would not be able to get manage_pages permission for all pages you access.
What this question boils down to is this" is the FB documentation for PPCA correct, and if so, how can we generate the access token(s) needed to use it, now that we have it?
Update: the following graph call (from the FB Graph API SDK for Python) that retrieves "posts" does work:
page_posts = graph.get_connections(id=getpage_id, connection_name='posts')
While the following one that attempts to retrieve reviews/ratings, does not:
page_reviews = graph.get_connections(id=getpage_id, connection_name='ratings')
The latter call produces the error:
(#210) A page access token is required to request this resource.",
"type": "OAuthException",
The Facebook Developers documentation says that the Page Public Content Access applies to ratings as well as posts, but this appears to contradict that, unless we are calling the graph incorrectly here.
You can only get a Page Token of Pages you manage - for other Pages (and Page Public Content Access), you can just use an App Access Token. More information: https://developers.facebook.com/docs/facebook-login/access-tokens/
For ratings/reviews, you MUST use a Page Token. Page Public Content Access only gives you access to the Page feed and photos, for example.

How to get access token of Facebook closed group? (I am one of the admins)

I want to get all the posts and comments from my Facebook group.
When I using Facebook API, it needs me to provide access token of this group.
I could get all the text from a public group, but don't know how to get data from private groups.
https://developers.facebook.com/docs/graph-api/reference/v2.4/group/feed
The user_managed_groups permission can be used to read the group
content for a group in which the user is an admin
Of course you need a User Access Token for that.