グラフAPIバージョン

Comment

読み取り

A Facebook comment

New Page Experience

このエンドポイントは新デザインのページに対応しています。

Feature Permissions

名前説明
ページの公開コンテンツへのアクセスThis feature permission may be required.

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

パラメーター

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

フィールド

フィールド説明
id
token with structure: Comment ID

The comment ID

admin_creator

For a comment made by a page, the page admin who wrote it. A page access token is required to access this field.

application

The app this comment was published by

attachment

Link or photo attached to the comment

can_comment
bool

Whether the viewer can reply to this comment

can_hide
bool

Whether the viewer can hide this comment from everyone except the comment author and the author's friends. This can only be true for comments on Page posts

can_like
bool

Whether the viewer can like this comment

can_remove
bool

Whether the viewer can remove this comment

can_reply_privately
bool

Whether the page viewer can send a private reply to this comment

comment_count
unsigned int32

Number of replies to this comment

created_time
datetime

The time this comment was made

from
User|Page

The profile that made this comment

is_hidden
bool

Whether this comment is hidden from everyone except the comment author and the author's friends

is_private
bool

Whether the comment is a private comment

like_count
unsigned int32

Number of times this comment was liked

live_broadcast_timestamp
unsigned int32

Time the comment was made on a live video

message
string

The comment text

message_tags

Profiles tagged in mentions in the message

object

The object the comment is on

parent

For comment replies, the comment this is a reply to

permalink_url
uri

The permanent static URL to the comment

private_reply_conversation

If private reply was sent to this comment, gets private conversation between the page and author of the comment that was started by private reply

user_likes
bool

Whether the viewer has liked this comment

エッジ

エッジ説明
Edge<Comment>

Comments made on this

Edge<Profile>

People who like this

Edge<Profile>

People who reacted on this

エラーコード

エラー詳細
100Invalid parameter
80001There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
200Permissions error
368The action attempted has been deemed abusive or is otherwise disallowed
190Invalid OAuth 2.0 Access Token
283That action requires the extended permission pages_read_engagement and/or pages_read_user_content and/or pages_manage_ads and/or pages_manage_metadata
2500Error parsing graph query
459The session is invalid because the user has been checkpointed
613Calls to this api have exceeded the rate limit.
210User not visible

作成

commentsのエッジにPOSTリクエストを以下のパスで送信できます:
このエッジにPOSTする場合、a Commentが作成されます。

パラメーター

パラメーター説明
attachment_id
numeric string or integer

ID for a photo attachment to associate with this

attachment_share_url
URL

Link to set the comment attachment to. Does not include the url in the message

attachment_url
URL

Link to set the comment attachment to

is_offline
boolean

Whether the comment was originally made while offline

message
UTF-8 string

Same as the text param

絵文字をサポートします
text
UTF-8 string

The text of the comment that allows emoji

絵文字をサポートします

戻り値の型

このエンドポイントはリード‐アフター‐ライトに対応し、idによって表されたノードを戻り値の型で読み込みます。
Struct {
id: token with structure: Comment ID,
}

エラーコード

エラー詳細
100Invalid parameter
190Invalid OAuth 2.0 Access Token
368The action attempted has been deemed abusive or is otherwise disallowed
200Permissions error
1705There was an error during posting.
459The session is invalid because the user has been checkpointed

更新中...

/{comment_id}にPOSTリクエストを送信してa Commentを更新できます。

パラメーター

パラメーター説明
attachment_id
numeric string or integer

ID for a photo attachment to associate with this

attachment_share_url
URL

Link to set the comment attachment to. Does not include the url in the message.

attachment_url
URL

Link to set the comment attachment to.

is_hidden
boolean

Is this comment hidden? Only applicable to Page comments

message
UTF-8 string

The text in the new comment message

絵文字をサポートします

戻り値の型

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

エラーコード

エラー詳細
200Permissions error
368The action attempted has been deemed abusive or is otherwise disallowed
100Invalid parameter
80001There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
190Invalid OAuth 2.0 Access Token
210User not visible

削除中です

You can delete a Comment by making a DELETE request to /{comment_id}.

パラメーター

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

戻り値の型

Struct {
success: bool,
}

エラーコード

エラー詳細
200Permissions error
100Invalid parameter
368The action attempted has been deemed abusive or is otherwise disallowed
190Invalid OAuth 2.0 Access Token

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