Content Publishing API
The Content Publishing API is a subset of Instagram Graph API endpoints that allow you to publish media objects. Publishing media objects with this API is a two step process — you first create a media object container, then publish the container on your Business Account.
Currently, the API can only be used to publish photos.
Publishing photos is a two-step process:
- Use the
/user/mediaedge to create a media object container, then
- Use the
/user/media_publishedge to publish that container
For example, let's say you have a photo at...
... that you want to publish it with the hashtag "#BronzFonz" as its caption. You could use the
/user/media edge to create the container like this:
POST graph.facebook.com /17841400008460056/media? image_url=https%3A%2F%2Fwww.example.com%2Fimages%2Fbronz-fonz.jpg& caption=%23BronzFonz
This would return a container ID (let's say
17889455560051444), which you would then publish using the
/user/media_publish edge, like this:
POST graph.facebook.com /17841405822304914/media_publish ?creation_id=17889455560051444
- We will cURL your image using the passed in URL so it must be on a public image server
- Maximum file size: 8MB
- We support JPEG, PNG, BMP, and non-animated GIFs
- Must be within a 4:5 to 1.91:1 aspect ratio range
- Minimum resolution: 150x150 (lower resolutions will be scaled up to the minimum)
- Maximum resolution: 1920x1080 (higher resolutions will be scaled down to the maximum)
We do not support:
- User tags
- Shopping tags
- Branded content tag
- Multi-image posts
- If you run into errors generating a container, it's safe to retry until you successfully receive a containder ID.
- If your run into errors publishing a container, retry with the same container ID until you succeed. To prevent duplicate posts, avoid creating and publishing a new container ID.