How to get Facebook page notification via Graph API - facebook

Got a issue with Facebook Graph API. I want to read page notifications via Graph API. But Facebook documentation only states about user's notification.
Following only returns a user's notification (the user who provided the access token for this.)
http://graph.facebook.com/me/notifications
I did following techniques. But no luck.
01. But i tried with different urls with access token provided by the page. (with my stupid guess work by replacing page-id for me)
http://graph.facebook.com/page-id/notifications
02. Checked with Insights API. But Insights doesn't provide a straight forward solutions. This is more like stats. But all i just need a list of latest user/fan/post actions in the page.
https://graph.facebook.com/page-id/insights/field
Some background about my App (hope no issues with this as other API's working),
Platform .Net 4.0
Library I am using is C# Facebook SDK
Facebook documentation doesn't help much. I have spent a few day on this to find a solution for this. Just wondering if any of you guys came across this issue and solved. I hope i didn't put a duplicate question here, as i did search for few days on Stackoverflow too.
Thanks.

There isn't a page notification API. I don't believe there is any way to directly query this data.
You can get notifications of changes to a Facebook page using the Real-Time API. https://developers.facebook.com/docs/reference/api/realtime/

Facebook now allows you to read Page unread notifications by querying the edge: {page-id}/notifications.
See https://developers.facebook.com/docs/graph-api/reference/v2.7/page/notifications

From the FB Page docs for the notifications edge...
Notifications for this Page. Deprecated April 30, 2019.
Looks like the only way to track Page notifications at the moment is via the realtime Webhooks for a page, which isn't the same as reading the notifications from FB but it appears to be where we're at...until FB changes their mind again. ;)
https://developers.facebook.com/docs/pages/realtime/

Related

Facebook Mentions on a Facebook Page with Graph API

Has anyone had success with a mention of a FB Page via the Graph API? I'm trying to have one page mention another posting via the Graph API.
I have permissions: "pages_read_engagement" and "pages_manage_posts".
Have tested using FB Pages I'm the admin of with an approved app I'm admin of. Also these Pages are over 6 months old. Also using a real user (mine) and not a test user.
Have posted with #[Page Id], #[Page Name], #[Page ID:Page Name], and #[Page Id:1:Page Name]
Made sure in the Page setting mentions by others is allowed.
Using Facebook SDK version 11.0
and the post always has the mentioned removed.
For example "This is great #[109904187850644]"
posts as "This is great"
The only time mentions show is when the Page mentions itself.
For reference:
https://developers.facebook.com/docs/features-reference/page-mentioning
Related question but using version 2.1 from 7 years ago: Mention Facebook Page in Page API Post
Any thought on the issue? Permissions, way posting, etc?
I have done this recently so I hope I can help you out.
To me it sounds like while you have the required permissions you are missing the actual Page Mentioning Feature. As described on the Page Mentioning Reference the Feature is required to #mention other Pages this is why mentioning the posting Page itself works.
To get authorization to use said feature you have to do an App Review.
Additionally you might want to read up on the differences between Permissions and Features.
From my experience there is no way to test out any functionalities requiring a Feature without doing an App Review because the Graph API will not return any useful data even in development mode while you can test out any permissions without having to do an App Review before.

Graph API empty events list of page [duplicate]

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

Facebook status post via app doesn't show in Newsfeed

I am using facebook graph api to post a status to Facebook via my app.
The problem is I can't see the status post in NewsFeed, but in the
Wall of the user.
I just used me/feed accordingly to GraphAPI documentation.
When I searched this issue, I saw quite similar thing http://developers.facebook.com/bugs/302089206530370.
This one is quite similar one too .Facebook graph post on feed is not visible in newsfeed, but that api is deprecated a long time ago and not the same API that I am using.
This one is exactly the same like my issue. http://developers.facebook.com/bugs/353691264693202 but sadly, facebook doesn't provide info in detail. can't find the duplicate issue.
I asked for scope=user_photos,read_stream,publish_stream,offline_access,user_status,friends_status grant access for my app.
Is there anything that I missing out?
Edited: I confirmed my setting of whether I have set to hide my app post in my newsfeed too. But I didn't set it.
I think that is the facebook bug. already found the similar one reported http://developers.facebook.com/bugs/372776119424090?browse=search_4fc3354fb769c0726100997
For the time being, I can only wait for Facebook to fix that bug.
Thanks.

Having issue sharing my Websites post to Facebook's timeline

We want users to be able to post to their Facebook if they want to. We have it kind of working with the older Facebook profile but not with the new Timeline.
We want it to be like Tumblr where you can post/share to your Facebook account as much as you want.
Is there a limit of post that we can have a day per users or the via entire API in general?
We are using FB connect already of course!
The documentation for Facebook's Open Graph is probably the best place to start. Take a look at their best practices page, as well:
If your application is making too many calls, the API server might rate limit you automatically, returning an "API_EC_TOO_MANY_CALLS" error.

Facebook shows news feed messages that aren't returned by any of the APIs

I noticed that my feedback news feed shows certain posts that aren't returned by any of the API's. (I tried the GraphAPI and the legacy REST API and FQL).
I can see those status updates at http://facebook.com on my news feed and I can also see them in the Facebook mobile app on iPhone and the mobile app on Windows Mobile.
Some of my friends seem to have set a privacy setting. I think it is this one: "How people bring your info to apps they use" - decheck "My Status Updates", although I can't confirm that is the only reason their posts don't show up, it seems one possible explanation.
So, what API are these facebook mobile applications using which returns the same data as the web site ? Is it possible for me to build another facebook client using that API?
Have you acquired the read_stream extended permission? This is required to see all postings. Typically without it you don't see any posts, but I think you can see posts that are marked as being completely public.