グラフAPIバージョン

Video Poll Option

読み取り

Represents a single poll option that may be selected by the user

Feature Permissions

名前説明
Live Video APIThis is a required feature permission

Graph API Explorer
GET /v24.0/{video-poll-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(
 '/{video-poll-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(
 "/{video-poll-option-id}",
 function (response) {
 if (response && !response.error) {
 /* handle the result */
 }
 }
);
/* make the API call */
new GraphRequest(
 AccessToken.getCurrentAccessToken(),
 "/{video-poll-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:@"/{video-poll-option-id}"
 parameters:params
 HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
 id result,
 NSError *error) {
 // Handle the result
}];
グラフAPIを使用する方法については、グラフAPIの使用ガイドをご覧ください。

パラメーター

このエンドポイントにはパラメーターがありません。

フィールド

フィールド説明
id
numeric string

Poll option ID

is_correct
bool

True if this answer is considered correct, otherwise false

order
int32

Options appear in increasing numerical order within a poll

text
string

Text to display to the user for this option

total_votes
int32

Total number of votes for this option

エラーコード

エラー詳細
100Invalid parameter

作成

このエンドポイントではこの操作を実行できません。

更新中...

このエンドポイントではこの操作を実行できません。

削除中です

このエンドポイントではこの操作を実行できません。

AltStyle によって変換されたページ (->オリジナル) /