/{question-id}
A Facebook Question post.
Questions are deprecated for pages and users. This documentation exists only for historical reasons. You can still read the data from old questions, but you can't create new ones.
This endpoint is deprecated in v8.0+.
GET /v9.0/{question-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{question-id}',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/{question-id}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{question-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:@"/{question-id}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
user_questions
permission is required to view all questions by that person.Name | Description | Returns |
---|---|---|
| The ID of the question. |
|
| Time when question was created. |
|
| Profile that asked the question. | |
| Text of the question. |
|
| Time when question was last updated. |
|
You can no longer create questions.
You cannot delete questions using the Graph API.
You cannot update questions using the Graph API.
This endpoint is deprecated in v8.0+.
Name | Description | Type |
---|---|---|
/options | The options for people to answer this question as a list. |