Facebook and Instagram
Facebook and Instagram both post through the UmbHost.Automate.Meta package. One Automate connection (type meta, shown as Facebook & Instagram) serves both:
- Facebook channels post to a Facebook page with Create Facebook Page Post (
meta.createFacebookPost). - Instagram channels post to the Instagram professional account linked to the same page with Create Instagram Post (
meta.createInstagramPost).
Add one channel for each, both using the same connection.
dotnet add package UmbHost.Automate.MetaWhat Meta needs
Section titled “What Meta needs”-
Create a Meta app (type Business) and get it through App Review for
pages_manage_posts,pages_read_engagement,instagram_basicandinstagram_content_publish. The Instagram account must be a professional (Business or Creator) account linked to the page. -
Get a page access token that doesn’t expire:
- Exchange a short-lived user token for a long-lived one:
GET https://graph.facebook.com/v27.0/oauth/access_token?grant_type=fb_exchange_token&client_id=…&client_secret=…&fb_exchange_token=… - Call
GET /me/accountswith that long-lived token. The page’saccess_tokenhas no expiry date. It stops working only if it is revoked, for example by a password change or the app losing its permissions.
- Exchange a short-lived user token for a long-lived one:
-
Put it in configuration:
{ "Umbraco": { "Automate": { "Secrets": { "MetaPageAccessToken": "..." } } } }
The Automate connection
Section titled “The Automate connection”Automate → Connections → Create → Facebook & Instagram. Enter the page ID and run Validate. It reports the linked Instagram account id: enter that in Instagram Account ID.
The Graph API Version setting defaults to v27.0. Meta supports each version for about two years.
Then add the channels as described in Connecting networks.
Channel options
Section titled “Channel options”None, for either network.
What is sent to Facebook
Section titled “What is sent to Facebook”| Post field | Sent as |
|---|---|
| Text | The post’s message. |
| Link URL | Facebook builds the preview card itself. The link is ignored when the post has an image. |
| Image | Optional. Facebook downloads it from the public URL. |
| Image alt text | Not sent. Facebook’s post action has no alt text. |
| Link title and description | Not sent. |
Facebook allows 63,206 characters.
What is sent to Instagram
Section titled “What is sent to Instagram”| Post field | Sent as |
|---|---|
| Text | The caption. |
| Image | Required (image.required:instagram). Instagram only takes JPEGs, so Social sends a JPEG version made by the site’s image processor (the image URL with format=jpg). |
| Image alt text | Sent. |
| Link | Not sent. Links in Instagram captions aren’t clickable, so Social leaves the link out. |
Instagram allows 2,200 characters, and 100 posts published through the API per account in 24 hours. The action waits up to two minutes for Instagram to process the image before publishing it.
See Network limits.
When a post fails
Section titled “When a post fails”The Graph API has no idempotency key. If the publish request (or the Facebook post request) fails without a clear answer, the action doesn’t retry, and Social records the post as Unknown: check the account before retrying.