Graph API empty events list of page [duplicate] - facebook

Using the latest version (2.12) of the Facebook API I'm trying to get (public) events for a page, using the Graph API Explorer.
However, I can't seem to get it working:
When I hover over the greyed out "id" or "name" on the left, it says "Field is empty or disallowed by the access token".
Now the page I'm using as an exmple here is Techcrunch, and they have plenty of events coming up. So "empty" doesn't seem to be the issue.
On the "disallowed" side I've checked the API reference on https://developers.facebook.com/docs/graph-api/reference/page/events/.
However, I can't seem to find any issue here either. It says "Reading Page events requires a valid Page access token or User access token with basic permissions.".
What am I missing here? Any hints are greatly appreciated!

Visit https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#pages-4-4
Currently Facebook is not returning events for pages using Pages API unless you use an user accesss token and that user has been invited to any of the events of the page or is attending/interested in any of the events of the page.

As unknow_b said :
currently to access events you can also use a user endpoint such as ‘/me/events’ or ‘/me/events/not-replied’ using an access token valid for that user. you can get the events that the user was invited to or is going/interested
But the access token user, is only working for 1 hour !
Does someone have another better idea?

I'm trying to do the same thing: getting public events from a page. Related to the above suggestions:
I tried the short-lived user access token two weeks ago, which worked for a short time. Now it does not anymore. Does it for any of you?
Both the long-lived user token, a page token generated with either a short- or long-lived user token do also not return any events.
At https://developers.facebook.com/docs/apps/review/#platforms, Facebook states:
Beginning April 4, 2018, all apps, including those formerly approved, must undergo App Review in order to gain access to the Events API, Groups API, and Pages API. Apps accessing the Events API and Groups API will lose access and require review once App Review resumes.
So being reviewed might help. I will report further.
Update 1: an answer on this related bug reports states it more clearly:
App review required to use the following edges: GET /page/events and GET /me/events
Meanwhile they cancelled all pending review requests for the Graph API 3.0 changes, so I have to resubmit.
Update 2: My project got rejected & I'm not bothering to continue it now.

Yep. Facebook has taken down the Graph API for page access tokens. I had this code in production for 2 years and it worked great. The only way to retrieve data (or was a week or so ago), was a temporary user token that lasts about 2 hours. It's totally broken my band's schedule page. I've been through every avenue and even spoke with a facebook ad team employee on the phone that was aware of it. She seemed to empathize but had no solution for me. I would count on it being down for a while.

I just created a python script, you can see here. It queries the given facebook page and it's events, and puts the data into a mysql table.

It looks like it won't be working anymore due to the scandal with Facebook Analytics (see Why does Facebook Graph API say my account is non-active?).
In the popular plugin facebook-events-by-location-core, you can take a look into the issue#29 discussion. It's well explained there, and I don't think so there's a way we'll get the data in a public API available anymore.
There were also some rumours it was a competition for their (dead?) Facebook Local app, but not sure about this.

I have finally figured out a work around for this. On your fb application, you have to disable the secret key requirement. This can be found under the advance settings of your fb application console. It's called " Require App Secret".
Once you generate a fb PAGE access token, you get a fb page token, and then extend it. here is the token debugger: https://developers.facebook.com/tools/explorer/
You can extend the access token programmatically as explained here: https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension
AND
https://developers.facebook.com/docs/facebook-login/access-tokens/#pagetokens
OR
There is also an extend tool in the access token debugger (just click on the debug and the extend button is bottom left): https://developers.facebook.com/tools/accesstoken/

Yes , we had a working product back in 2016 ( almost like it's successor Fb Local ) . We were monetised and ready and selling events tickets on the messenger chatbot.
Idea was to solve discovery + booking for hyperlocal events. We went out of business and now its a heart ache to see Fb local.
enter image description here

Related

(#200) Access to this data is temporarily disabled for non-active accounts due to changes we are making to the Facebook Platform [duplicate]

We have some code that uses Facebook Open Graph API to display some posts on our home page. It was originally developed by a previous developer and I rewrote it in ASP.NET MVC for our home page (where before it was PHP which I believe was loaded in an iframe). At that time, I used the app ID and secret that were left to me. This has functioned fine for a couple of years. This afternoon, we started getting an error back on our site: "Access to this data is temporarily disabled for non-active accounts due to changes we are making to the Facebook Platform".
No sweat. I figured I just needed to update our ID and secret. Unfortunately, no one seems to remember the user ID that was in control of that app ID. No sweat. I'll make my own. Unfortunately, any ID and secret I use to access posts -- even my own posts on a page totally not related to work -- returns the same access error. I can get name or cover or some other fields, but as soon as I request any posts, I get the error.
Here's an example of what I'm trying:
https://graph.facebook.com/MyCompanyName?fields=cover,name,likes,link,posts.limit(5){created_time,message,link,type,full_picture,picture,source,icon}&access_token=bunchofnumbers|bunchofnumbersandletters
I am aware of the status post at https://developers.facebook.com/status/issues/205942813488872/, but I think I must be doing something wrong since I can't even create new appIDs to get posts with.
Why does Facebook Graph API say my account is non-active?
Thanks.
Please read this article:
Mark Zuckerberg apologises for Facebook's 'mistakes' over Cambridge Analytica
Cambridge University researcher named Aleksandr Kogan had used an app to extract the information of more than 50 million people, and then transferred it to Cambridge Analytica for commercial and political use.
So facebook is changing its policies so that the personal data could be made more secure.
Until then you cant do anything about it.
I solved the problem on my website by removing the events from the fetched fields list
We started seeing this same error message on our platform today. I think there are a few things going on that all tie together:
As others have mentioned, there have been rapid and major responses by Facebook to increase data protection and privacy in light of the Cambridge Analytica incident. From what I understand, the bad actors exploited the ability access the data of Users (via the graph) that the app did not have an active, first-party relationship with. So, sort of like how "6 degrees of separation" would get you the whole planet, the 1 degree of separation on the few-hundred-thousand Users that connected with the app directly gave the app access to roughly 50 Million users...or something like that. FB is doing what they can to lock that stuff down now, big time.
The specific cause of your error is that something you're asking for in the fields parameter makes a leap (from the either the myCompany or the OAuth'd User/App whose access_token you are using) to a related item/items that FB now deems must have an "active" first-party/direct relationship with your Company/App/User in order to access. This is why you see the somewhat cryptic "non-active accounts" mentioning. I think they really mean that it's not "active with you or your app".
I'm not sure which one of the fields you request is at fault, but some trial-and-error will lead you to it. For us, it was clear: we were asking for the Members of all the Groups that User had access to. We didn't need that, so we cut it out and the error went away.
Facebook today updated the term and conditions
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes/?translation&hc_location=ufi#groups-4-4
My understanding is that if your not a production app, they are limiting your for specific reasons. Unclear if thats because of Cambridge Leak, or upgrading the instagram api.
I also received the same error, however, if you are testing, you can hard code the graph api explorer token into your app to continue testing...
var data {
'accessToken': 'EEAC...',
}
FB.api('/' + id, getData, data, (_response) => {
console.log(_response);
});
Right now I am working with Facebook Open Graph API. And I was having this error every time I wanted to access/get the member (and their basic info) of the groups I am Admin.
{
"error": {
"message": "(#200) Access to this data is temporarily disabled for non-active accounts due to changes we are making to the Facebook Platform",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "Byueyj6MtkoIx"
}
}
In between trial and error #JoshChristy was getting all the desired results! And after couple hours of research we discovered that facebook recognize some account as "non-active" and some "active" (I don't know based on what!) because I am pretty much active in facebook.
So, if you are getting this error that means you are not active enough for facebook ;)
I had this problem. It's solved automatically. I think it's a Facebook issue.
For me it work if I leave just one field - "name". If I add "link" and/or "events" fields it returns error
I was able to get Facebook Page Access token using the method below.
For anyone who may already have an app which has been reviewed can use that app's details as a temporary fix until Facebook is done with their API enhancements. Meaning you'll have to add the relevant redirect uris to the reviewed app as well as use that app's App Id and App Secret.
This works for retrieving page feeds and leads, I wasn't able to retrieve conversations. Also the permissions I requested were { scope: 'ads_management,ads_read,manage_pages' }
In our case, we retrieved, for example, a page access_token with a page ID using like this:
this.call('v2.12/'+pageid, 'GET', {fields: "access_token"}, token)
ended up with the error you mentioned.
However, we took a normal approach and all looks good now.
https://developers.facebook.com/docs/facebook-login/access-tokens#pagetokens
Same thing I just noticed too, and they kept my lead gen ads running and charging me eventhough they blocked the data.
Luckily going into ad manager directly you can still download the CSV/XLS files.
What is issue?
This error is due to recent action taken by Facebook. They said ” Access to certain types of API data is paused for non-active accounts due to changes we are making to the Facebook Platform” So if your account is non-active and you have created App using it then it might possible you get this error in your Plugin. Facebook Issue link is
When it will resolved?
Facebook has temporarily disabled some non-active accounts as they mentioned they haven’t given any estimated time to fix issue but it should get activated soon.
You can find more update on facebook Event API here

Why does Facebook Graph API say my account is non-active?

We have some code that uses Facebook Open Graph API to display some posts on our home page. It was originally developed by a previous developer and I rewrote it in ASP.NET MVC for our home page (where before it was PHP which I believe was loaded in an iframe). At that time, I used the app ID and secret that were left to me. This has functioned fine for a couple of years. This afternoon, we started getting an error back on our site: "Access to this data is temporarily disabled for non-active accounts due to changes we are making to the Facebook Platform".
No sweat. I figured I just needed to update our ID and secret. Unfortunately, no one seems to remember the user ID that was in control of that app ID. No sweat. I'll make my own. Unfortunately, any ID and secret I use to access posts -- even my own posts on a page totally not related to work -- returns the same access error. I can get name or cover or some other fields, but as soon as I request any posts, I get the error.
Here's an example of what I'm trying:
https://graph.facebook.com/MyCompanyName?fields=cover,name,likes,link,posts.limit(5){created_time,message,link,type,full_picture,picture,source,icon}&access_token=bunchofnumbers|bunchofnumbersandletters
I am aware of the status post at https://developers.facebook.com/status/issues/205942813488872/, but I think I must be doing something wrong since I can't even create new appIDs to get posts with.
Why does Facebook Graph API say my account is non-active?
Thanks.
Please read this article:
Mark Zuckerberg apologises for Facebook's 'mistakes' over Cambridge Analytica
Cambridge University researcher named Aleksandr Kogan had used an app to extract the information of more than 50 million people, and then transferred it to Cambridge Analytica for commercial and political use.
So facebook is changing its policies so that the personal data could be made more secure.
Until then you cant do anything about it.
I solved the problem on my website by removing the events from the fetched fields list
We started seeing this same error message on our platform today. I think there are a few things going on that all tie together:
As others have mentioned, there have been rapid and major responses by Facebook to increase data protection and privacy in light of the Cambridge Analytica incident. From what I understand, the bad actors exploited the ability access the data of Users (via the graph) that the app did not have an active, first-party relationship with. So, sort of like how "6 degrees of separation" would get you the whole planet, the 1 degree of separation on the few-hundred-thousand Users that connected with the app directly gave the app access to roughly 50 Million users...or something like that. FB is doing what they can to lock that stuff down now, big time.
The specific cause of your error is that something you're asking for in the fields parameter makes a leap (from the either the myCompany or the OAuth'd User/App whose access_token you are using) to a related item/items that FB now deems must have an "active" first-party/direct relationship with your Company/App/User in order to access. This is why you see the somewhat cryptic "non-active accounts" mentioning. I think they really mean that it's not "active with you or your app".
I'm not sure which one of the fields you request is at fault, but some trial-and-error will lead you to it. For us, it was clear: we were asking for the Members of all the Groups that User had access to. We didn't need that, so we cut it out and the error went away.
Facebook today updated the term and conditions
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes/?translation&hc_location=ufi#groups-4-4
My understanding is that if your not a production app, they are limiting your for specific reasons. Unclear if thats because of Cambridge Leak, or upgrading the instagram api.
I also received the same error, however, if you are testing, you can hard code the graph api explorer token into your app to continue testing...
var data {
'accessToken': 'EEAC...',
}
FB.api('/' + id, getData, data, (_response) => {
console.log(_response);
});
Right now I am working with Facebook Open Graph API. And I was having this error every time I wanted to access/get the member (and their basic info) of the groups I am Admin.
{
"error": {
"message": "(#200) Access to this data is temporarily disabled for non-active accounts due to changes we are making to the Facebook Platform",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "Byueyj6MtkoIx"
}
}
In between trial and error #JoshChristy was getting all the desired results! And after couple hours of research we discovered that facebook recognize some account as "non-active" and some "active" (I don't know based on what!) because I am pretty much active in facebook.
So, if you are getting this error that means you are not active enough for facebook ;)
I had this problem. It's solved automatically. I think it's a Facebook issue.
For me it work if I leave just one field - "name". If I add "link" and/or "events" fields it returns error
I was able to get Facebook Page Access token using the method below.
For anyone who may already have an app which has been reviewed can use that app's details as a temporary fix until Facebook is done with their API enhancements. Meaning you'll have to add the relevant redirect uris to the reviewed app as well as use that app's App Id and App Secret.
This works for retrieving page feeds and leads, I wasn't able to retrieve conversations. Also the permissions I requested were { scope: 'ads_management,ads_read,manage_pages' }
In our case, we retrieved, for example, a page access_token with a page ID using like this:
this.call('v2.12/'+pageid, 'GET', {fields: "access_token"}, token)
ended up with the error you mentioned.
However, we took a normal approach and all looks good now.
https://developers.facebook.com/docs/facebook-login/access-tokens#pagetokens
Same thing I just noticed too, and they kept my lead gen ads running and charging me eventhough they blocked the data.
Luckily going into ad manager directly you can still download the CSV/XLS files.
What is issue?
This error is due to recent action taken by Facebook. They said ” Access to certain types of API data is paused for non-active accounts due to changes we are making to the Facebook Platform” So if your account is non-active and you have created App using it then it might possible you get this error in your Plugin. Facebook Issue link is
When it will resolved?
Facebook has temporarily disabled some non-active accounts as they mentioned they haven’t given any estimated time to fix issue but it should get activated soon.
You can find more update on facebook Event API here

Facebook Graph Api me/home Seems To Return Same as me/feed

I know there have already been a lot of questions asked about replicating the users home feed and using me/home, but my question is slightly different.
A few months ago I wrote code to authenticate with Facebook (get user access token) and then retrieve their home feed with me/home. This worked fine at the time as far as I can recall. I've just gone back to the code today, and it doesn't appear to work. The result I get back looks almost the same as me/feed, which is to say it is almost entirely posts from the same account and not posts from 'friends'. Just one post from someone else, a change to their profile pic, shows up but the rest are all 'self posts'.
This only happens with tokens for my own app. If I use graph explorer using the same token, I get the same result. If I use graph explorer with it's own token then it shows me something much more like the actual home feed on the Facebook site. Generating new tokens doesn't help. I have checked the permissions on the tokens used are the same, in fact I even copied the permission list from the generated graph token into my app and re-authenticated, but it didn't help. If my app does the request, then I get almost nothing from other people from me/home. This is the same if I use myuserid/home. Makes no difference.
So my question is, why? Have Facebook changed something and is there a way to change my app so it gets a better version of the home feed?
Secondly, while researching this I've discovered posts saying read_stream won't be granted by Facebook to any app on any platform that has an 'official facebook app'. Does this mean I'm out of luck anyway, even if I get this working for testing purposes using the account that owns the app, I won't actually be able to publish it so others can use it?
Thanks.

List Facebook Page events on website for a Venue using FQL or Graph API

I am helping out a friend with a site for a venue that lists all events on FB with a location, ticket URI, time, etc.
I have found lots of info on how to get the data, but what I am unclear on is how to get public events without being logged in to FB.
What type of tokens do I need to have a website simply pull events data and display it to visitors?
Basically, what I am attempting to do is show a set number of upcoming events and assume that the visitors to the site are not logged in to FB.
On this page, https://developers.facebook.com/docs/reference/fql/event, it says this:
Permissions
To read the event table you need:
a generic access_token for public events (those whose privacy is set to OPEN)
a user access_token with user_events permission for a user who can see the event for non-public events
an app access_token with user_events permission (for non-public events, must be the app that created the event)
a page access_token with user_events permission (for non-public events, must be the page that created the event)
I am not looking to get help with the code really, I am just having trouble figuring out how the access/auth process works.
It appears FQL may be the best option so I can do queries based on date ranges, but alas, I am stuck on the access/auth/token part.
What do I need to have in place to be able to list a Page's events on a 3rd party site?
If anyone has any advice there, I would appreciate it. Thanks.
Just to explain to others, you cannot get ALL the events in the city by graph search. You need to refine it either by user details or some other metric.
I figured it out.
This question helped, but was not correct and there is a syntax error in an answer:
Get Facebook events from public fan page
From what I found, you need to become an FB developer, create an app, get an ID and secret.
Use the SDK (PHP in my case), and this question had a good example of returning the list I want:
Link from ticket_uri is opening a blank page
I am having the same issue though of getting blank pages on the ticket link if the user is not logged into FB.
But my original issue is solved.

Stop receiving real time updates for a Facebook page

I have followed the instructions on this page:
https://developers.facebook.com/docs/reference/api/page/#realtime
But I can't get the Deleting an App section to work.
This is the case with both the PHP SDK and with Facebook's Graph API Explorer.
First I add an app to get real time updates by POSTing to
/<page_id>/tabs
with the app_id parameter set to my App ID. I also pass an Access Token for the page.
This returns 'true' in the Graph Explorer, and '1' with the PHP SDK, which I understand means success in both cases. I know this is true as I have received data to my real time endpoint.
However, I also need to be able to delete these subscriptions, per page.
The documentation suggests this is done by performing a DELETE to
/<page_id>/tabs/app_<app_id>
Again passing the same Access Token as before.
In both the Graph Explorer and the PHP SDK, this returns:
(#100) Tab is not installed or not removable: <The same app_id I passed>
I've seen a couple of other people reporting the same issue, but apparently no solutions. If anyone has managed to figure this out, I would hugely appreciate your thoughts.
There are two possible alternatives:
Go to https://www.facebook.com/{page_id}/settings?tab=apps and manually remove the application from the page. If the app is not there, it has already been removed.
Or:
You can use the Real-time Update documentation and use a DELETE API call to unsubscribe the page from real-time updates. However, if your application is used with more than once page, it will also unsubscribe the other pages.