get books read by friends using facebook api - facebook

the facebook profile of a user contains the user likes in form of movies,books,television etc. I want these details for a user's friend.For eg, if B is a friend of A, then the books read by B should be displayed when one logs in the app.

The list of friends returned via the /me/friends endpoint is now
limited to the list of friends that have authorized your app.
Source: https://developers.facebook.com/docs/apps/changelog
Facebook also removed all friend permissions, so you will not get the books of the friends in any case. This is mostly for privacy reasons.

Related

Get Facebook Friendlist (only read)

I'm developing an app which is super important to get the user's friends.
I just need to get a list of friends (Avatar and name) I do not require any more information or want to do anything with that data, you simply get a list of friends.
With the new change in Facebook it is impossible?
Regards!
See point 3.) of
https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
/me/friends returns the user's friends who are also using your app
In v2.0, the friends API endpoint returns the list of a person's friends who are also using your app. In v1.0, the response included all of a person's friends.
There are two key use cases where apps need access to non-app friends: tagging and inviting. In v2.0, we've added the Taggable Friends API and the Invitable Friends API to support these flows.

Accessing Friends List on new FB APIs for non-app users

I am building an app where users can send picture messages to friends and would like users to see their Facebook friends list when they login through FB. However, I am confused by Facebook's new API information regarding the access that an app can have to display someone's list of friends. On the FB change log information page it says:
1) Friend list is no longer part of the default permission set and has its own permission: Asking for access to a person's friend list is now a separate permission that your app must request. The new permission is called user_friends.
2) Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app.
https://developers.facebook.com/docs/apps/changelog
Does this mean that my app will only display to users their Friends that are also using my app? Is there no way for a User to see their entire friends list? And if not, how can I prompt the User to invite new friends to use my app?
Thanks.
Yes, that is exactly what it means, and for what you want to do there is no way to get the friends who did not authorize your App. But maybe you want to use the Send Dialog instead: https://developers.facebook.com/docs/sharing/reference/send-dialog
For that, you don't even need to authorize the user and he can choose the receiver on his own.

Facebook API Getting Friends of a friend

Good day, we are building an app that NEEDS to have information of user's friends' friends. For example: John logs into the app and he has 100 friends, each of those 100 friends also has 100 friends that equals to 10,000 people, application needs to get info like profile picture and basic info of those 10,000 people. We know that it was possible in the old API of Facebook, what happened now? If the current API doesn't have this function can we get exclusive access to this particular function for our servers only?
No, you can only access (non public) data about your app's users and their friends (subject to their privacy settings) - there's no permission which grants access to the friends of friends or their private data.

Fetching list of friends in Graph API or FQL - Appears to be missing some friends

Any chance the 'me/friends' graph api or friends FQL table return some friends only?
I've checked the results and it's slightly less than the count I see on facebook.com
In Graph API V1.0
A call to /friends on a User object (e.g. /me/friends) or a query of the friend FQL table should return all friends of that user except
Those who have deactivated their accounts
Those who have blocked your app
Those who have disabled all Platform apps from accessing their data. - If a user enables this option (see below) you can't access any information about that user via the API, including their basic info, posts they make, etc. They won't appear in the friends list of your app's user via the API.
If you find friends are missing from the response it's almost certainly for one of those reasons, and in my experience most people asking this question are asking about the third case.
The option to remove platform option is currently under Privacy Settings -> Ads, Apps & Websites -> 'Turn off your ability to use apps, plugins, and websites on and off Facebook
If you're not getting all friends in a single call and you're sure it's not because of one of those reasons, check if you have a limit parameter in your query - and increase it if it's less than the number of friends you think should be appearing.
e.g. /me/friends?limit=5000 for the maximum number of friends allowed, 5000
Note that the friends count will include users which can't be retrieved in the list (e.g. the friend_count field of the User FQL table)
In Graph API V2.0 or higher
A call to /friends on a User object will, if the user has granted your app the user_friends permission, return the friends of that user who have also granted your app the user_friends permission -
You can read more about the change from v1.0 to v2.0 in Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app or on Facebook's changelog
You need to pass a limit parameter.
'me/friends/?limit=0' it will return all your friends.
UPDATE
the parameter limit=0 returns 0 friends,
to get all your friends, you need to set the limit=5000 (it's the max number allowed)
With the introduction of the Facebook Graph API 2.0, access a user's friends list was removed and limited to just friends who use the same application. However, Facebook added two new APIs to allow retrieval of Friend names (and indirectly a friend count). The two new APIs are taggable_friends and invitable_friends.
Url:
me/taggable_friends?limit=1&fields=id,name,

Get a list of friends of a friend on Facebook

I've recently started looking into the Facebook API and am trying to work out how to retrieve the list of friends of another user (in this case the user is someone I'm friends with).
So far I've only worked out how to find out the friends of a person who I am also friends with. However the Friends Wheel application can do it as you can generate a wheel base on one of your friends, so I'm guessing it is possible.
Anyone know how to do this?
You Can only access friends list of logged in user(i.e, your friend list) or the logged in user's friends that are users of your app. i.e, You can access friends friend list only if your friends are the users of your app.
You can check if two of your friends are friends using friends.are_friends.
Once you've got a valid access token for a user, you can query the Graph API with said token and query the "friends" connection of the user object (/me/friends). So if your user ID is "123":
https://graph.facebook.com/123/friends?access_token=USERS_ACCESS_TOKEN
You can also use /me to reference the current user:
https://graph.facebook.com/me/friends?access_token=USERS_ACCESS_TOKEN
Without a valid access token, you cannot query information about users and access to friends of friends is determined by each user. For example, I cannot see some of my friend's friends:
Can't lookup all friends of (ID). Can only lookup for the logged in
user (ID), or friends of the logged in user with the appropriate
permission.
...but for some of my other friends, I can. There's probably a permission or flag you can check to see if they allow access, but I'm not currently seeing it.
I figured this out.
1) The best you can do is find mutual friends
2) Try using the v1.0 of the Facebook Graph API. v2.0 doesn't have /mutualfriends.
3) Since I was only interested in my own social network, I grabbed the access token from the graph explorer and wrote a python script to download my whole social network. The code is on github
Yes, its possible to get List of Friends of a friend but only condition is that friend should be user of that application.
Suppose there is an application "APP" used by "A" then the APP can get his friends List , now you want friends List of "B" who is friend of "A" , it will be possible only if "B" also uses the "APP"
Facebook are in the process of deprecating the REST API, and have added equivalent support to the Graph API for this method. You can use Graph API - User object and Get /User_id1/friends/User_id2 to check if User_id1 is friends with User_id2 .