Facebook get invited friends id - facebook

I am able to get list of inviteable friends using this https://developers.facebook.com/docs/graph-api/reference/v2.2/user/invitable_friends.
But I am not getting ids of Facebook friends.
Or if it is not possible Can I get list of invited_friends?
I want to show friends as "invited" if user has invited them.

You get an invite token, not the ID of the users. The invite token is only valid for a short time, so you cannot use it to identify users later. There is no way to get a list of invited friends either.

In api v2.x, we cannot fetch the user frienda ids. In previous api version, we could fetch all fb friend ids. Invited friends ids was been saved on app server and filter that out from all friends to show invited icon. But in latest version this solution will not work, as there is no call available to fetch friends ids.

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.

Get FB user id of an invitable friend

In my js facebook app, I'm retrieving all the invitable friends of a user. This return an array of obects containing:
Their name
Their profile picture
An invite token
However, I want them to be able to send a message to this invitable friend, therefore I need the user id of this user. Would their be a way to get this?
Cheers!
You can get user ids of your friends by sending that invitable tokens to facebook Apprequest. In AppRequest's responce you will get a list of key "to" that contains the user ids of friends who has been invited by you. Thank You.

Facebook count friends

I have a problem with Facebook API.
I need to get total number of users friends.
/me/friends
returns only friends that are using app even if I have permission user_friends.
How can I get only number of users friends, nothing more, no need to get their id, mail etc. just total nu,ber of user's friends.
If you are using API v2.0 you can not get all friends. And if you created your app after 4/30/2014 you have to use API v2.0.

Can you lookup friends of friends with the Facebook graph API?

My app needs to generate a list of friends for the logged in user, as well as the friends of the friends. The logged in user has authorized the app. So I have no trouble getting their friends. When I make the /friends/ call to the API using one of the friends' IDs, I get this error message:
Can't lookup all friends of [FB ID]. Can only lookup for the logged in user or the logged in user's friends that are users of your app.
I knew that the public visibility of one's friends is a configurable setting for each individual user, but if I understand this message correctly it means that you simply cannot do what I'm trying... ever.
Question #1: Is this true? Is there simply no way to lookup someone's friends' friends?
Question #2: If it's not possible, how do sites like Glassdoor.com manage this exact functionality?
You cannot get the friends of friends of the person who is using the app.
Glassdoor.com sends invitations to the user's friends and when someone accepts, they simply get his friends since he becomes a user of their app.

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 .