Get Facebook comment likes / reactions count - facebook

After Facebook API changes in recent weeks (https://newsroom.fb.com/news/2018/04/restricting-data-access/), is there any possibility to get reactions / likes on public posts?
I need to get a lot of status / comments / reactions (anonymised) from some public Facebook news page, e.g. CNN, Daily Mail etc. for educational purpose only - for my schoolwork. So I'm talking about data that can be seen by any Facebook user.
At first I tried Graph API Explorer, but it doesn't provide likes. After a while, I found out it is possible with an app. It worked for a moment, but the next day after I started getting the data, Facebook blocked it due to Cambridge Analytica scandal - I get this error now:
{
"error": {
"message": "(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "ElMgcZXjgMt"
}
}
My app is only "In Development" mode, and is not planned to be made public, I created it only for this single purpose - big data analysis homework.
Regarding Pages API, Facebook wrote on 4th of April: "So starting today, all future access to the Pages API will need to be approved by Facebook." However, they did not mention how to do it.
Could someone help me what should I do? I'm stuck at this point.

Related

How to get comments that rate the service from many Facebook pages (from restaurants) for sentiment analysis in 2018? (Twitter is not good enough)

I need to know If I need to give up on Facebook and just use Twitter for my purposes (if so, just tell me to use Twitter). I want to use pages I don't own.
I am doing this same process in Twitter, but Twitter doesn't have pages that rate places, services or things in general with comments and a rating system (or atleast the ones I need from one city with specific places).
Twitter has much more liberty to get comments from any #user_name but its not good enough for a sentiment analysis specific assignment I need to do. I am trying to get facebook comments or posts from multiple facebook pages (pages from restaurants) based on the comments used for ratings and download them to a csv or database with any program or by coding (Preferably Node.js, javavascript or php) for sentiment analysis (this is very easy with Twitter!). How can I achieve this with all the policies and restrictions Facebook has in 2018??
I have some questions with reference to facebook:
Will an app_id and app_secret by making an app in 2018 give me an access token to get the comments I need from ANY page and download them with graph api?
Is facebook graph API the only way to get comments or posts to download them?
Why doesn't any type of code or programs before and even right now in 2018 work anymore to get comments? (I get the errors below with either programs or graph api).
I tried to use Graph API from facebook for 2 different pages using GET and POST and I get some errors that I didn't have trouble with 9 months ago (this happens with every page I try to search with code in node.js, javascrip, php or the graph API from facebook):
GET/v3.1/OMENbyHPLatam/feed
{
"error": {
"message": "(#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.",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "CXg962vUvjY"
}
}
POST/v3.1/minecraft/feed
{
"error": {
"message": "(#200) Requires either publish_to_groups permission and app being installed in the group, or manage_pages and publish_pages as an admin with sufficient administrative permission",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "EZvhzuk/UHL"
}
}

facebook app - accessing own page API during development

thanks for taking the time to read this!
I am developing an events based application using the facebook graph API. I am up to date with all the recent drama surrounding their changes etc. etc. (thanks, previous Stack Overflow questions!)
In multiple recent places on facebook (blog, changelog, app review etc.) there is this phrase:
"While testing and before submitting for review, your app may only access content that is available on a Page that you own. "
This is what we need to do so we can physically develop our app. Alas, on the graph api explorer armed with our 'app token' I am hit endlessly with:
{
"error": {
"message": "(#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.",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "CUbrJ1mlpCE"
}
}
I'm sure there are others out there managing to develop their apps in order to submit them for review, I've probably overlooked something silly but I've been at this for hours and can't seem to make headway, has anybody else managed to do this?

Facebook business manager to use Page API

For those that will read it, thank you very much (and special thanks for helpers).
We're having some trouble with Facebook, and we're not sure if it's related to Facebook latest scandals.
Facebook forums are not the most responsive, so I thought to give it a shot here.
The goal is to read posts from our customers pages.
We thought that to create Business Manager with system user, ask our customers to add us as partners to their pages, generates page tokens and use the {page_id}/feed API.
In order to test this flow, we did the next steps:
created BM
created Facebook Page (via the BM)
created an app
associated the app with the BM.
in BM settings page - created System User.
assigned the system user with the created page (admin role)
generated token (related to the app created).
using Graph API, called to me/accounts (with the access token given at 7).
I verified that the page id was in the response, and took the access_token from the response.
tried to call {page_id}/feed (or to /me).
This is the error I received:
{
"error": {
"message": "(#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.",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "BV/3aru6KTJ"
}
}
Thanks for anybody that helps.
seems you have go far:
take a look from the image and put some details to be approved after that you have to submit it. approval will take time just be patient.
App Review-> Add Items-> Page Content Access.. hopefully the rest instruction from developer.facebook.com will be understandable.
for those newbies just take a look how to start an app.
https://developers.facebook.com/docs/apps/register

Facebook Graph API – access denied for public page event

I'd like to receive data on a public page event via the graph api. I have been doing this for quite a while now, but suddenly my code is not working any longer.
Take for example the page ID 128431033877314. A graph api GET call to
128431033877314/events
delivers – as expected – the list of events for this page. Amongst them, for example, the event with ID 158032248286483. Trying to receive any data for this event fails, returning my favorite graph api error:
{
"error": {
"message": "Unsupported get request. Object with ID '158032248286483'
does not exist, cannot be loaded due to missing permissions, or does
not support this operation. Please read the Graph API documentation
at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "GN5BhnWsN5O"
}
}
I have tried accessing /158032248286483 and 158032248286483?fields=id, I have used the graph API explorer to check different versions (2.6 and 2.12), I have tried with user, page and app access tokens. All in vain. Same goes for any other event returned.
As I said – this has most certainly been working before. I can hardly imagine this being a bug, as it would affect quite an important piece of graph api functionality. So I assume I am missing something here. Could somebody please tell me what it is?
Thanks so much in advance!
Yes, #CBroe, is right, in lights of "Cambridge Analytica" issue, Facebook was recently closed/deprecated/changed some endpoints. Reading bug reports many people complaining about lost access to some endpoints related to Events, Groups and Pages APIs. But, there actually two types of changes they did: some endpoints of Event and Groups APIs are deprecated means nothing you can do right now. (They will change/replace/tune it in future). And second part related to Pages API, that actually can be fixed with some coding on your side. For the Pages API they just forced May 8 breaking changes to take effect immediately. You need to migrate your requests to use "page access token" instead of "user access token" when you use those endpoints.
More info you can check there:
Blog post about actions they have taken:
https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes/
Facebook breaking changes:
https://developers.facebook.com/docs/graph-api/changelog/version2.11

Facebook Graph API not returning regionalized pages when using App Token

We have a server application monitoring certain Facebook pages for Videos being uploaded. As there is no user involved (server app only), we use an App-Token for our requests.
So far so good, but we have issues with Pages that are only available in certain countries or territories, e.g. "/bitburger" seems to be available in Germany only. I can access the page via API with an User Token (relating to a german user), but my server or even the graph/api explorer (authenticating with an App Token) cannot access the page info.
It will result in an error such as:
{
"error": {
"message": "Unsupported get request. Object with ID 'bitburger' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "AlDpyo1BjLm"
}
}
Our application is supposed to be global solution that does not care about "regionalized pages" and needs to get the page info (and its published videos) independently from a users location.
Is there any way to achieve this?
So is there a possibility to tell the API-call to ignore regionalized filtering?
User Tokens are not an option (as I said, server app only) and we cannot have a user for every country in the world. We wouldn't even know the right country to begin with :/ It has to work with a location-independant App Token.
Thanks in advance for your help!
Looking forward to any solution.
Thanks and kind regards,
Daniel
// Update:
Thanks for your responses!
I got in touch with Facebook and it is in fact due to "market sites" that only users from this market (country or whatever) have access to. This maps to the API as well and teh App itself does not relate to any market.
The only solution there is (when not having a user to request with), is to get access for your App granted by the page admin. Then you can access the pages info. Unfortunately that does not help for anonymous monitoring.