POST /{ig-user-id}/media
Create an image, video, or carousel IG Container for use in the post publishing process. See the Content Publishing guide for complete publishing steps.
Type | Description |
---|---|
If the app user was granted a role on the Page via the Business Manager, you will also need one of: | |
The app user whose token is used in the request must be able to perform |
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?image_url={image-url} &is_carousel_item={is-carousel-item} &caption={caption} &location_id={location-id} &user_tags={user-tags} &access_token={access-token}
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?media_type=VIDEO &video_url={video-url} &is_carousel_item={is-carousel-item} &caption={caption} &location_id={location-id} &thumb_offset={thumb-offset} &access_token={access-token}
POST https://graph.facebook.com/{api-version}/{ig-user-id}/media ?media_type={media-type} &caption={caption} &location_id={location-id} &children={children} &access_token={access-token}
Placeholder | Value |
---|---|
| API version. |
| App user's app-scoped user ID. |
Key | Placeholder | Description |
---|---|---|
|
| Required. App user's User access token. |
|
| A caption for the image, video, or carousel. Can include hashtags (example: Not supported on images or videos in carousels. |
|
| Required for carousels. Applies only to carousels. An array of up to 10 container IDs of each image and video that should appear in the published carousel. Carousels can have up to 10 total images, vidoes, or a mix of the two. |
|
| Required for images. Applies only to images. The path to the image. We will cURL the image using the passed in URL so it must be on a public server. |
|
| Applies only to images and video. Set to |
|
| The ID of a Page associated with a location that you want to tag the image or video with. Use the Pages Search API to search for Pages whose names match a search string, then parse the results to identify any Pages that have been created for a physical location. Include the Not supported on images or videos in carousels. |
|
| Required for videos and carousels. Applies only to videos and carousels. Set to |
|
| Applies only to videos. Location, in milliseconds, of the video frame to be used as the video's cover thumbnail image. Default value is |
|
| Applies only to images and carousels. An array of public usernames and |
|
| Required for videos. Applies only to videos. Path to the video. We cURL the video using the passed-in URL, so it must be on a public server. |
A JSON-formatted object containing an IG Container ID which you can use to publish the container.
Video uploads are asynchronous, so receiving a container ID does not guarantee that the upload was successful. To verify that a video has been uploaded, request the status_code
field on the IG Container. If its value is FINISHED
, the video was uploaded successfully.
{ "id":"{ig-container-id}" }
POST graph.facebook.com/17841400008460056/media ?image_url=https//www.example.com/images/bronzed-fonzes.jpg &caption=#BronzedFonzes! &user_tags=[ { username:'kevinhart4real', x: 0.5, y: 0.8 }, { username:'therock', x: 0.3, y: 0.2 } ]
{ "id": "17889455560051444" }
GET /{ig-user-id}/media
Get all IG Media on an IG User.
GET /{ig-user-id}/stories
endpoint instead.Type | Description |
---|---|
If the app user was granted a role on the Page via the Business Manager, you will also need one of: |
This endpoint supports time-based pagination. Include since
and until
query-string paramaters with Unix timestamp or strtotime
data values to define a time range.
GET graph.facebook.com/17841405822304914/media
{ "data": [ { "id": "17895695668004550" }, { "id": "17899305451014820" }, { "id": "17896450804038745" }, { "id": "17881042411086627" }, { "id": "17869102915168123" } ] }
This operation is not supported.
This operation is not supported.