Graph API Version

Question Option /{question-option-id}

This endpoint is deprecated in v8.0+.

An option given as an answer to a Facebook Question post.

Reading

Graph API Explorer
GET /v16.0/{question-option-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-option-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-option-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{question-option-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{question-option-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • A user access token with user_questions permission is required to view all questions by that person.
  • A Page access token is required to view all questions by that Page.

Fields

Name Description Returns

id

The ID of this option.

string

created_time

Time when option was created.

datetime

from

Profile that created the question.

Profile

name

Text name of the option.

string

object

Any Page associated with this option.

Page

vote_count

Number of votes this option has received.

integer

Publishing

You can no longer create question options or questions.

Deleting

You cannot delete options using the Graph API.

Updating

You cannot update options using the Graph API.

Edges

This endpoint is deprecated in v8.0+.

Name Description Type

/votes

The votes a particular option to a question has received as a list of the people who voted.

Profile[]