Last time I got the way to know how many users liked a photo with this way:
https://graph.facebook.com/161820597180936/likes?limit=1000
But I don't know why it doesn't work anymore. Now it only returns 3 or 4 facebook users in the case they work very well before. It happened 2 days ago, so I guess facebook changed something in it's API. Any suggestions on how to solve this problem?
This is a bug in the Graph API, and should eventually be fixed by Facebook.
Facebook has pledged to provide 90 day notifications before making breaking changes to the API, so it is important to file bugs even if you assume that a change was intentional but there was no prior notification.
Now it comes back as a part of the Graph API data set.
Look at the page - https://developers.facebook.com/docs/reference/api/ - for what the API header is, and then under the photos, it'll show you the data set that gets returned from the photo api request - (PHP example - https://graph.facebook.com/98423808305)
Hope that helps.
Related
I'm new on working with Facebook and honestly I found it very confusing, terminology and documentation seems to be very ambiguous in many cases. Can somebody please help me out with a plain english explanation on how I can achive the following?
Post and image to Facebook (on the user page) and then check the stats (insights) of that post.
Till now I have managed to:
1) Create an app
2) Post the image on the user page with the desired message
I'm not able to understand how I can retrieve information about the particular image which was uploaded through my app. I want to know how many people have viewed that image, how many likes did it get, how many times it was re-shared.
Is it possible at all?
I'm posting to /photo not too /feed and I will like to keep it this way if it is possible.
Sorry if this was answered already but I spent a few hours trying to find an appropriate answer but wasn't able to get the right documentation.
UPDATE 1
After having a couple of days off from this topic and receiving the first 2 answers, I took another dive into this. Now I have tried the Graph API Explorer as suggested, and using the ID of a POST I can get some details about the POST, but the insights aren't showing anything, just next and previous.
My goal is to be able to gatther some stats about the pictures uploaded through the app. If this is not possible directly what should be the approach I need to take?
I don't believe a personal /photo has /insights attached to it - the Insights Object documentation page suggests that they do not - but you should be able to get likes, shares, and comments via the API.
It would appear FB has launched a redesign/reorganization of its documentation in the last couple of weeks, but the documentation for the /photo graph object is here -- you will need the user's Access Token, and the API endpoints you're looking for each have links to their own documentation pages there, including example code for each type of request.
Edit (summarizing discussion in comments):
There is no method via the Facebook API to gather insights for all photos posted to individual user timelines via an app. The app can gather likes, shares, and comments for each of those objects individually via API requests, and can make API requests for insights for photos posted to its own timeline. Neither of those options solves the intended use case here.
I'd recommend a solution that uses Sharing rather than an app integration, as this allows for better access to insights on the photos being shared. This is also a much simpler integration, and less brittle wrt future Platform changes. The main tradeoff is that the original photos being shared are expected to expire after a couple of months -- if this is unavoidable, I'd suggest implementing a redirect for requests for expired objects on the site.
We are able to get different kind of photos or picture Using Graph API
like as below:
1.Page Photos
Photos for a Facebook Page.A Page Access Token is required for all methods.Find here
2.Page Picture
Picture belonging to a Facebook Page. Find here
3.Photo
Represents an individual photo on Facebook. Find here
4.User Photos
Photos for a person.Find here
I hope it's helps you.
Is there a way to know if a user is using my Facebook app in this moment? I tried to browse the Facebook Api Docs but is not very documented.
Thank you.
I suggest to track with last photo uploaded, last like, last comment, last post in time line etc. Which seems available in Facebook API.
Not that easy but acceptable.
Starting on July 30th, and every 3 days since, we've been getting this alert for our Facebook app, which is used on our site for Facebook Login and social posting:
In the last three hours 100% of the calls to the method plugin:post
resulted in errors.
Error Code 100
Error Description Invalid parameter
Error Count 5,971
Thing is, I have no idea what "plugin:post" is. Google and stackoverflow don't seem to know either, for that matter :) And 5,971 instances of it in 3 hours is more traffic than I would expect on our site.
Our codebase does not contain any references to "plugin:post", so I'm assuming "plugin:post" is an alias for some other functionality within the Graph API. I just don't know what. Anyone have an idea?
I did see there there is social plugin which uses an "fb:post" FBML style tag (https://developers.facebook.com/docs/plugins/embedded-posts/) that sounds like it could be related, but we don't use that plugin.
Any insight would be appreciated, thanks!
[Edit 9/13 for Azhar's question:]
I checked the July 2013 Breaking Changes, and nothing seemed like it would impact us.
[Edit 9/13 for Tobi's question:]
We're using:
- Open Graph API for social posting via the Feed dialog to either the user's news feed or a friend's news feed
- Facebook Login API to allow users to log into our site,
- Facebook Javascript api for geting user info (e.g. FB.api('/me'...), F.api('/me/friends'...), etc. ), and other data via FQL FB.api("/fql"...). I've verified that none of the FQL statements are impacted by the July 2013 changes.
I would post some code, but we have a fair amount of FB-related Javascript on the site, and I'm not sure which is the one causing the problem.
My Facebook app is receiving the exact same error message alerts from Facebook. I have exhausted all possible solutions and investigated every aspect of my logic, and I have concluded this is a bug on Facebook's side until someone can prove otherwise.
I have ignored these alerts so far and there has been no impact to my website or my users. Every integration point with Facebook works flawlessly using my personal Facebook account, test Facebook users and other non-admin users across all major browsers. Nothing appears wrong or broken.
When I investigate my Facebook app's insights and look at the developer view for activity and errors, I see plugin:post failures for the current month but when I go back one month there are absolutely zero API errors and it says "No API Errors". This is obviously wrong because I was getting alerts last month and this helps support my theory that the issue is on Facebook's side.
Turns out this was all due to a naming conflict in the HTML of our page. We had a page element with a class name of "fb-post". Facebook apparently treats this a "fb:post". Since our "fb-post" was not an actual FBML tag, it does not have the other parameters Facebook looks for in a post. So Facebook started giving alerts.
I suspect this is due to a change on Facebook's part, as we've had these "fb-post" elements in place for years now, without issue.
Incidentally, this is also the case for any elements with a class name of "fb-name", as Facebook treats that as "fb:name".
I'm sure some of you have seen this viral Facebook post going around. How it works is you enter your birth year into the comments like #[1988:] and it will give you a name. I am stumped trying to figure out how they are able to change the users comment programmatically. The Facebook API doesn't really provide any documentation on how this is done and the thing I don't understand is how its able to work without any of the users permissions? Is this even an app or some Facebook easter egg? Any ideas?
They're not doing anything and this isn't API usage either; that's Facebook's standard method for tagging in plain text posts - #[4:] for example will show Mark ZUckerberg's profile pic - it also works in chat
It works with 'birth years' because the first few hundred user IDs are mostly in use, because when Facebook first launched it incremented new uids from 4 upwards.
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/