Update API \ Update a post published on a Facebook page
Resource/URI | PUT | DELETE |
---|---|---|
Facebook · Page Post
/update/identities/<identity_token>/facebook/page/<pageid>/post/<postid>.json
|
Update Page Post | Delete Page Post |
Facebook · Page Picture
/update/identities/<identity_token>/facebook/page/<pageid>/picture/<pictureid>.json
|
- | Delete Page Picture |
Facebook · Page Video
/update/identities/<identity_token>/facebook/page/<pageid>/video/<videoid>.json
|
- | Delete Page Video |
Pinterest · Pin
/update/identities/<identity_token>/pinterest/pin/<pinid>.json
|
Delete Pin | |
Twitter · Tweet
/update/identities/<identity_token>/twitter/post/<postid>.json
|
- | Delete Tweet |
YouTube · Channel Section
/update/identities/<identity_token>/youtube/channel/section/<channel_sectionid>.json
|
Update Channel Section | Delete Channel Section |
YouTube · Playlist
/update/identities/<identity_token>/youtube/playlist/<playlistid>.json
|
Update Playlist | Delete Playlist |
YouTube · Playlist Video
/update/identities/<identity_token>/youtube/playlist/<playlistid>/video/<videoid>.json
|
- | Delete Playlist Video |
Workflow
Request: the code to send to the API
Send an API request to the following endpoint to update a post published on a Facebook page:
The <identity_token>
is obtained whenever one of your users connects using Facebook.
The <page_id>
must be part of the pages
that the identity is currently configured to be an administrator of and the <post_id>
must be the identifier
of a post published on that page.
In order to use this endpoint the permissions Manage Pages and Publish Pages must be enabled in the Facebook settings in your OneAll account and the user must have granted these permissions when he logged in with Facebook. You can use our Push API to publish a post on a Facebook page.
PUT
data to include in the request
{ "request": { "update": { "post": { "message": "#message#", "link": "#link#", "attachments": [ "#attachments#" ] } } } }
Key | Description |
---|---|
#message#string
|
The new message display on the post. Example: Hello World! |
#link#string
|
The new link to include in the post. Example: http://www.oneall.com/ |
attachments (list) - You can either include a link or attachments but not both at the same time. | |
#attachments#integer
|
The identifiers of one or more pictures or videos to attach to the post. Set the attachments to an empty array to remove all attachments from the post. Example: 10213097336001811, 10213097336001812 |
Result: the code returned by the API
The API either returns a HTTP status code 200
if the post was updates successfully
or an appropriate message body with further details on the error that occured.
Resultset Example
{ "response": { "request": { "date": "Wed, 06 Nov 2019 11:17:54 +0100", "resource": "/update/identities/555052e9-1c89-42eb-ad05-38e2dd2020db/facebook/page/156657567747763/post/156657567747763_2573367996076696.json", "status": { "flag": "success", "code": 200, "info": "The post has successfully been updated." } } } }