Graph API Version
Open Graph Context
Open Graph Context
Social context for Graph API objects. This can be used on major nodes in the Graph API.
Reading
Social context
Examples
GET /v2.9/{open-graph-context-id} HTTP/1.1
Host: graph.facebook.com/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
$session,
'GET',
'/{open-graph-context-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result *//* make the API call */
FB.api(
"/{open-graph-context-id}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{open-graph-context-id}",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{open-graph-context-id}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];Parameters
This endpoint doesn't have any parameters.
Fields
| Field | Description |
|---|---|
string | The token representing the social context |
Edges
| Edge | Description |
|---|---|
Friends who been tagged at this place | |
Friends who like this object Default | |
Friends who listened to this object | |
Friends who watched this object |
Validation Rules
| Error | Description |
|---|---|
| 100 | Invalid parameter |