Did Facebook graph just stop working today? - facebook

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

Related

Facebook Graph API - overall_star_rating and rating_count Fields Not Populating in v2.10

I'd like to get the overall_star_rating and rating_count fields for the Facebook pages for several companies. The Facebook Pages docs show that this information should be available, yet I can't get fields to populate.
Example:
Querying information for a local company, Utah Projectors.
Facebook Page: https://www.facebook.com/utahprojectors/
Facebook Page ID: 152868571589318
Overal Star Rating: 4.8
Rating Count: 13
When I go to the Facebook Graph Explorer and query use the query string 152868571589318?fields=name,overall_star_rating,about,rating_count I get the following response:
{
"name": "Utah Projectors",
"about": "We provide the best projectors around with the best service possible, all while keeping it local and personal.",
"rating_count": 0,
"id": "152868571589318"
}
You'll notice that the overall_star_rating isn't even included in the results (even though I requested it), and the rating_count doesn't show the correct number of ratings (which should be 13). I've tried changing my access token to just about everything I can think of - Using the Graph API Explorer tokens, using my Facebook App tokens (User Access Token, App Token, Page Access Tokens), and just about every combination I can think of. Clearly, I'm missing something.
What's even more curious is that I swear I was able to successfully query this information not more than a couple weeks ago! But I can't seem to get anywhere today. Please help! Any advice would be greatly appreciated!
This was a legit bug on Facebook's end, but it looks like they have fixed it. Details can be found here: https://developers.facebook.com/bugs/1816620328365587/

page_fans_city returning no results from Graph API

I'm trying to get access to the page_fans_city edge from the Facebook Graph API.
I am using the following query:
https://graph.facebook.com/v2.5/StrandTowerHotel/insights/page_fans_city/lifetime
For some reason though it keeps returning no data when I am using the Graph API explorer.
note: I am an admin/owner of the page
Whats interesting though is that if I just query https://graph.facebook.com/v2.5/StrandTowerHotel/insights/ then I get all the other metrics results returned but "page_fans_city" is not in the results.
I have read through and tried the following solutions already posted on stack overflow but they don't seem to solve the issue.
Getting number of people who like a page on facebook by city
Facebook PHP Graph API not returning complete data
facebook: permanent Page Access Token?
Many thanks in advance for any help you can give me
After much searching and bug fixing it ended up being the facebook api was just having issues. now working perfectly :(

How Can I Follow Other facebook Accounts using Facebook Graph API

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.

Choosing fields in Facebook graph v2.2

I recently upgraded from using Facebook graph v1.0 to using the latest v2.2 and am having trouble migrating over some existing functionality.
I am trying to get the profile pictures along with some other data from the "me/home" request.
My old code was this https://graph.facebook.com/v1.0/me/home?fields=id,from.picture, from.id,to.picture, to.id, story, picture, link, name, description, type, status_type, created_time.
The new graph api doesn't allow the "from.picture" to be completed. How do I get the profile picture included in the "me/home" request?
Thanks,
Mike
It is still possible to get the picture of the poster in one call, with field expansion:
/me/home?fields=from{name,picture}
Source: https://developers.facebook.com/docs/graph-api/using-graph-api/#fieldexpansion

Facebook graph API: feeds missing in json response

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