Graph API Version

/{app-id}.context/friends_using_app

A list of friends who are also using this Facebook App.

Reading

GET /v2.10/{app-id}?fields=context.fields%28friends_using_app%29 HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{app-id}',
  array (
    'fields' => 'context.fields(friends_using_app)',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{app-id}",
    {
        "fields": "context.fields(friends_using_app)"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("fields", "context.fields(friends_using_app)");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{app-id}",
    params,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"fields": @"context.fields(friends_using_app)",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{app-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • A valid user access token with user_friends permission is required to return any friends of that user.
  • Only friends who use the requesting app will be returned.
  • The session user and any friends must both have granted user_friends permission to the app in the request path.

Fields

An array of User objects each representing a friend, and the following:

NameDescriptionType

summary

Some metadata which summarizes the social context.

object

total_count

The full count of friends using the app.

integer

Publishing

You can't publish using this edge.

Deleting

You can't delete using this edge.

Updating

You can't update using this edge.