Retrieving friend's likes from the Facebook Graph API - facebook

Howdy- I have been tooling around with the Facebook Graph API and successfully retrieved back a list of my likes, and a list of my friends (once I authenticated using OAuth). But what I really want to achieve is pulling back my friend's likes. When I try and do that, obviously using the same URL that I use to pull back my own likes but subbing the friend's user id for "me", I don't get anything back, unless they have installed the app as well. Then I get them no problem. To be clear, I can only see the likes of friends who have installed my application. So clearly I am running into a security/rights issue of some sort.
I could see where this would be the case; you simply aren't allowed to see your friend's likes unless they have installed the same app. Fair enough, but then how is blekko.com doing it? I even tried using FQL without much luck. I suspect I am missing something totally obvious. Anyone had any luck with this? Maybe with the Javascript API or one of the other access methods? Thanks in advance for any guidance.

Your application needs the permission "friends_likes".
Check http://developers.facebook.com/docs/authentication/permissions for more info on the different permissions.
This SO answer might help if you're having trouble with the authentication / permission request process.

Related

Query friends list of facebook user using the service

From my understanding Facebook has made changes to their API such that third-party services can no longer have access to the friend list (at least names) of someone using your app (while being logged in facebook, of course).
Does anyone know if I maybe just missed one API endpoint, and it is still somehow possible? I just know that the original one is deprecated/has been removed. Thank you.
(Wasn't sure where to ask this, so I turned to stackoverflow. I know it's not the best use of the site, I apologize for that.)
No, you did not miss anything, accessing the friend list is no longer possible. You can only get data of users who authorized your App too, every other user is not available at all - for privacy reasons.

Are there any alternatives to Facebook's /{user}/home deprecated api?

Facebook removed the /{user}/home api on October 6, 2015.
I'm wondering if anyone knows if there are any alternative methods to access news feed data.
I've worked with /{user}/feed but of course that only shows data for the currently logged in user.
I've tested with my wife to be sure and she can only she posts on her wall and I can only see posts on my wall and neither of us can see each others posts no matter what permissions are set on them.
I'd like to think that currently logged in user could access any data via the api that they could via the site (assuming they've granted the proper permissions of course.), but this doesn't appear to be the case.
Of course I am particularly interested in the news feed and I suspect that the there is no alternative but I don't want to give up yet.
I'd like to think that currently logged in user could access any data
via the api that they could via the site
No, that would be a privacy issue, because your app could access data/posts of users who did not even authorize your app and no one knows what you do with the data. So the answer is no, there is no alternative.

Get Mutual_Likes from Facebook Graph API

I am trying to get the mutual likes using the facebook graph API. But I'm having difficulties, I'm testing using the Explorer Application (https://developers.facebook.com/tools/explorer)
Using the following request:
ID?fields=context{mutual_likes}
But if I use my application it returns only the count as
"total_count": 0
But I know there are mutual likes. In fact, if I use the Graph API Explorer Application, (changing the ID) it works and brings the mutual likes.
Both users I'm testing with are friends in facebook and have their likes public. My app has recently been approved to use the user_likes permission. And maybe I'm missing something, I was hoping you could help me achieve this.
I finally figured out why the request returned only the count as 0. It had nothing to do with making the request server-side.
I managed to get the mutual_likes by having the users also approve the user_friends permission. Even though I wasn't going to use it in the GET request.
Apparently you need both permissions (user_likes & user_friends) if you plan to extract anything from the context fields of a user.
Hope it helps someone else.

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.

Get application liker via graph api

How can i get all the facebook user id whose like my application via a graph api.
Please give any suggestion.
Like facebook fan page showing application liker randomly. I also want to access my application liker list and want to save in database.
Please tell me if any possibility? Need your suggestion...
Thanks
Sorry, I don't think that's possible for privacy reasons Facebook doesn't allow it. You need to get people who like you application to install and authenticate it before you can find out more about them. However, I do remember someone managing to scrape the fans of a page before so maybe that's possible for applications as well...