Graph API Version

Instagram Comment

This node is for Instagram Ads and is part of the Marketing API.

Reading

An Instagram comment

Examples

Graph API Explorer
GET /v2.9/{instagram-comment-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{instagram-comment-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{instagram-comment-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{instagram-comment-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:@"/{instagram-comment-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription

comment_type

enum

Enum indicating the type of comment {CAPTION, NORMAL, UNKNOWN}

created_at

datetime

Creation time of the comment in milliseconds

id

string

Base 64 encoded string of instagram_media_id and instagram_comment_id

instagram_comment_id

numeric string

Id of the comment in instagram

instagram_user

Instagram user who made the comment

mentioned_instagram_users

Instagram users that are mentioned in the comment

message

string

Textual message content of the Instagram comment

Edges

No edges

Validation Rules

ErrorDescription
100Invalid parameter

Creating

You can make a POST request to comments edge from the following paths:
When posting to this edge, an InstagramComment will be created.

Parameters

NameDescription
ad_id
Numeric String

Ad id associated to this Instagram Media

Required
message
string

Comment text

Required

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: string,
}
You can make a POST request to comments edge from the following paths:
When posting to this edge, an InstagramComment will be created.

Parameters

NameDescription
ad_id
Numeric String

Ad id associated to this Instagram Media

Required
message
string

Comment text

Required

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: string,
}

Validation Rules

ErrorDescription
100Invalid parameter

Updating

You can update an InstagramComment by making a POST request to /{instagram_comment_id}.

Parameters

NameDescription
ad_id
Numeric String

Ad Id associated to this Instagram Media

Required
hide
boolean

Boolean denoting whether the comment is to be hidden or unhidden

Required

Return Type

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

Validation Rules

ErrorDescription
100Invalid parameter

Deleting

You can delete an InstagramComment by making a DELETE request to /{instagram_comment_id}.

Parameters

NameDescription
ad_id
Numeric String

Ad Id associated to this Instagram Media

Required

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter