Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook 'Friends.getAppUsers' using Graph API

I have an application that uses the old REST API call Friends.getAppUsers to get the list of friends for the current user that have authorized my application.

I have read the documentation, how do I do this with the Graph API? What would an example of this be?

like image 594
Richard Avatar asked May 06 '10 23:05

Richard


People also ask

Does Facebook use graph API?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

How do I get Facebook Page Insights on graph API?

You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.

Is Facebook Graph API deprecated?

Applies to all versions. Facebook Analytics will no longer be available after June 30, 2021. Additionally, we are deprecating the App Dashboard Plugin for Marketing API. For more information visit the Business Help Center.


2 Answers

I searched around for a while, and I too thought this wasn't possible using Graph API.

However, I posted a similar question, Replacement for old GetAppUsers call to see a user's friends who use my application?, for the specific API I was using and was given a great general answer.

https://graph.facebook.com/me/friends?fields=installed 

or more generally

https://graph.facebook.com/{user id}/friends?fields=installed 

This returns all friends, with the additional field "installed=true" for those friends who use the application.

Here is it working in the Graph API Explorer:

like image 142
Alex Avatar answered Oct 20 '22 00:10

Alex


This can be done with FQL.

SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = ?) AND is_app_user = 1 

QED!

like image 26
loungerdork Avatar answered Oct 20 '22 01:10

loungerdork