Represents an Instagram Photo, Video, Story, or Album. IGTV and Reels are not supported.
This Node allows you to:
To get all media objects on an IG User use the IG User Media Edge.
This operation is not supported. To create an IG Comment, use the IG Media Comments Edge instead.
GET /{ig-media-id}?fields={fields}
Gets Fields and Edges on an IG Media.
comments_count
will count comments on a photo, but not comments on ads that contain that photo.@
) symbol unless the app user is also able to perform Admin-equivalent Tasks on the app.media_url
field will be omitted from responses if the IG Media contains copyrighted material or has been flagged for a copyright violation.Type | Description |
---|---|
If the app user was granted a role on the Page via the Business Manager, you will also need one of: |
GET https://graph.facebook.com/v9.0
/{ig-media-id}
?fields={fields}
&access_token={access-token}
Parameter | Value |
---|---|
| The app user's User Access Token. |
| A comma-separated list of Fields you want returned. |
caption
* (excludes album children). Will not include the (@
) symbol unless the app user is also able to perform Admin-equivalent Tasks of the app.comments_count
* (excludes album children and the caption, includes replies)id
*ig_id
is_comment_enabled
(excludes album children)like_count
* (excludes album children and likes on promoted posts created from the media object, includes replies)media_type
*media_url
* (will be omitted from responses if the IG Media contains copyrighted material, or has been flagged for a copyright violation.)owner
(only returned if the IG User making the query also owns the IG Media object, otherwise the username
field will be included)permalink
*shortcode
thumbnail_url
(only available on video IG Media objects)timestamp
* — ISO 8601 formatted creation date in UTC (default is UTC ±00:00)username
*Fields marked with an asterisk (*) are public Fields, which means they can be returned through Field Expansion.
children
* (carousel albums only)comments
(excludes album children, replies to comments, and the caption) insights
Edges marked with an asterisk (*) are public Edges, which means they can be returned through Field Expansion.
curl -X GET \
'https://graph.facebook.com/v9.0
/17895695668004550?fields=id,media_type,media_url,owner,timestamp&access_token=IGQVJ...'
{ "id": "17895695668004550", "media_type": "IMAGE", "media_url": "https://fb-s-b-a.akamaihd.net/h-ak-fbx/t51.2885-9/21227247_1640962412602631_3222510491855224832_n.jpg?_nc_log=1", "owner": { "id": "17841405822304914" }, "timestamp": "2017-08-31T18:10:00+0000"
POST /{ig-media-id}?comment_enabled={comment_enabled}
Enables or disables comments on a media object.
Query string parameters are optional unless indicated as required.
{comment_enabled}
(required) — Set to true
to enable comments or false
to disable comments.An access token from a User who created the media object, with the following permissions:
instagram_basic
instagram_manage_comments
pages_read_engagement
or pages_show_list
If the token is from a User whose Page role was granted via the Business Manager, one of the following permissions is also required:
ads_management
pages_read_engagement
business_management
POST graph.facebook.com /17895695668004550?comment_enabled=false
{ "success": true }
This operation is not supported.