I am using Facebook Graph API, to get Page post.
https://graph.facebook.com/v2.7/357708837646769/posts?access_token=TOKEN&limit=25&fields=id,name,type,link,description,message,picture,source,from,created_time,object_id,shares,likes.limit(1).summary(true),full_picture
This API works fine. and returns value.
However when I get a post type video, I try to fetch to Video Source using below API:
https://graph.facebook.com/v2.7/716404295377384/?access_token=TOKEN&fields=source
https://graph.facebook.com/v3.1/716404295377384/?access_token=TOKEN&fields=source
Here is the Page post doc on Facebook
https://developers.facebook.com/docs/graph-api/reference/v3.1/post
If we check the fields, for source it says:
Name: source
Description: A URL to any Flash movie or video file attached to the post.
Type: string
However, the API is not returning any value for "source" field. Tried with both 2.7 & 3.1 Graph API version. Also Facebook has not mentioned anywhere, that the "source" field is deprecated or won't be available in API.
Any help?
Also Facebook has not mentioned anywhere, that the "source" field is deprecated or won't be available in API.
They mention the following change in the changelog for v2.12,
https://developers.facebook.com/docs/graph-api/changelog/version2.12#gapi-90-videos
Page-owned videos — The source field will no longer be returned for Page-owned videos unless the User making the request has a role on the owning Page.
So, are you using the right kind of access token …?
We are using version 2.3 of the FB graph API to get insights (specifically viral impressions, reach, engaged, talking about, and impressions) for a page photo post. It works without issue. However when we try to make this same call in version 2.4, it fails. See an example call we used in the Graph API explorer below
/1129724967054634_1214739968553133/insights/?metric=['post_impressions_unique']
We've tried both PageID_ObjectID and PageID_Photo ID in the call, but neither returns the insights data mentioned above. We can get likes and comments for the Object, but nothing at all for the Photo. Are we missing some change in the way Facebook treats page photo posts between versions?
All of a sudden I'm getting errors when doing requests I've used for years. For example:
https://graph.facebook.com/dangoodspeed
Should return info about my account, but instead it returns the error:
(#803) Cannot query users by their username (dangoodspeed)
Other sites that use Facebook Graph like findmyfacebookid.com doesn't work either.
Does anyone know what's going on? Will this be fixed soon? Will I have to rewrite my apps around these errors?
As #WizKid said, this has been announced more than a year ago. You cannot use the username anymore, and this is by design:
https://developers.facebook.com/docs/apps/changelog#v2_0
/me/username is no longer available.
You can find the ID of your profile and include it to your Graph path in V2.3
Find the ID using the Facebook Graph API Explorer.
/v2.3/me
Include your ID to the Graph path as
yourID/feed
I tried follow and og.follow
both didn't worked for me
if Anyone has the PHP Code Then Please Share{PHP SDK}
and Also How To Grab No Of Followers using Graph API{PHP SDK}
P.S:I Am Using BlackBerry Token
The /{user_id}/subscribers edge is no longer available since v2.0:
https://developers.facebook.com/docs/apps/changelog#v2_0_graph_api
/me/subscribers and /me/subscribedto have been removed.
I try to fetch user's feeds via graph api from my Android application. It generally works but some feeds that I can see on the wall are missing in the json response.
I call the url http://graph.facebook.com/someUserId/feed, by using the Android Facebook SDK methods, so the access token should be provided automatically, but it's not really relevant I think in my case. Nevertheless fyi, the user of my app is authenticated via OAuth.
I already checked the following:
all the user's feeds are visible to everyone / public (set in privacy settings)
the json response is not cached by my browser
I am aware of paging, but this is not an issue. The problem is not that I am not getting the very oldest feeds but that some feeds are just missing in between.
I registered a new facebook user which is not connected to the user I want to retrieve the wall feeds from, and when I open the respective wall I see all the feeds there, as expected, since they're all public to everyone. Yet, when I open the same related json url unter http://graph.facebook.com/someUserId/feed, some feeds are missing.
This is an example of the problem - since all my posts are public, I can just call the json url directly in a browser to do a test.
I want to get wall feeds from user:
http://www.facebook.com/mathias.lin
Screenshot1: note the 3 marked postings, all posted by myself
and here the json response, as you can see, the 1st and 3rd wall posts are included in the json, but the 2nd post is not. Why?
The related json url is:
http://graph.facebook.com/mathias.lin/feed
I am getting the 'missing' feed when I add an access_token to the url - but why? The posted feed has a privacy setting for 'everyone'?!
This is the missing feed that I get when using the access_token:
{"id":"504063796_485195138796","from":{"name":"Mathias Lin","id":"504063796"},"message":"Photo test upload from Android","picture":"http:\/\/photos-e.ak.fbcdn.net\/hphotos-ak-snc6\/hs021.snc6\/165194_485195123796_504063796_6062399_1841907_s.jpg","link":"http:\/\/www.facebook.com\/photo.php?fbid=485195123796&set=a.485195118796.256450.504063796","name":"Torres Photos","icon":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/yz\/r\/StEh3RhPvjk.gif","actions":[{"name":"Comment","link":"http:\/\/www.facebook.com\/504063796\/posts\/485195138796"},{"name":"Like","link":"http:\/\/www.facebook.com\/504063796\/posts\/485195138796"}],"privacy":{"description":"Everyone","value":"EVERYONE"},"type":"photo","created_time":"2011-01-06T05:10:43+0000","updated_time":"2011-01-06T09:00:23+0000","likes":6,"comments":{"data":[{"id":"504063796_485195138796_3607414","from":{"name":"Mathias Lin","id":"504063796"},"message":"Awesome, photo upload now works as well. Not so much fun working with the Facebook SDK for Android, would have expected more functionality beyond that just very very simple graph api wrapper. But need to be considered that the android sdk development was part of an internship - but since it's it's open source, it can luckily be modified. Which has to be done due to some bugs (mixing up the bundle parameters for a post, getString, getByteArray). Api documentation could be improved.","created_time":"2011-01-06T05:26:04+0000"},{"id":"504063796_485195138796_3608020","from":{"name":"Renate Hermanns","id":"628810487"},"message":"Wow
, how fast time passes by. Your daughter is nearly grown up ;-).","created_time":"2011-01-06T09:00:23+0000"}],"count":2},"attribution":"Torres"}
I've already posted the question to the FB dev forum, awaiting response.
Related threads:
http://forum.developers.facebook.net/viewtopic.php?id=81365
http://forum.developers.facebook.net/viewtopic.php?id=75984
Facebook Graph API "/userid/feed" returning Blank
Your approach is correct, I've seen the JSON and yes it's missing the second one, I think it's upload app form adroid, try checking the application settings for this app. Or If your trying to retrieve the wall FQL is a much better way
SELECT post_id, actor_id, target_id, message FROM stream WHERE source_id in (SELECT target_id FROM connection WHERE source_id=<uid> AND is_following=1) AND is_hidden = 0
I've been through this, the way Facebook is categorizing their permissions is somehow misleading, for example Publicly available may sounds like Available to everyone on Facebook but apperantly it's not.
Now in your case, if you already authenticated the user, then try using:
/me/feed
I guess this is the only case where access_token is not needed in the URL.
I had a similar problem. But for me, the problem was related to not setting the scope properly on first login (to authorize the app). I posted a similar question and got an answer that worked for me here:
Facebook API how to get all wall items