Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph API - Friends using application

Is there a function in the Facebook.php library for getting friends of the user using a certain application. Something like:

$friends = $facebook->api('me/friends?access_token=' . $access_token);

But instead of listing all friends, it just lists friends using the same application.

like image 680
diggersworld Avatar asked Sep 20 '10 13:09

diggersworld


People also ask

How do I make a graph API on Facebook?

Go to Tools – Graph API Explorer to generate Access Tokens for various kinds of API that you would like to use in your app. Choose the app and kind of token you need in the drop down menus in the left part of the screen. Then click “Generate Access Token”.

How do I share a Facebook post on a graph API?

Yes, you can share using the graph2 api. The way you do it is to use /feed edge and pass the post's url that you want to share as the link. Standard Fb permissions to the post you are sharing do apply. This was done today, in a local rails app, using FbGraph2 gem, with the above method.

How do I use Facebook Graph API and extract data?

To use the Graph API Explorer tool, go to developers.facebook.com/tools/explorer. Generate the access token you need to extract data from the Facebook Graph API by selecting Get User Access Token from the App Token drop-down menu under the name of your app.


1 Answers

You should be able to do this with FQL:

select uid, name, is_app_user from user where uid in (select uid2 from friend where uid1=me()) and is_app_user=1
like image 191
serg Avatar answered Sep 24 '22 17:09

serg