The facebook api shows that you can post a link to an event feed by POST'ing to "EVENT_ID/feed" and only specifying the "link" paramater:
However when doing this the result is:
{ "error": {
"message": "(#100) The message can't be empty when posting to an event's wall",
"type": "OAuthException" }
}
If I specify "message", it will post only the message and not a URL.
How do I post a URL to an event's feed?
Related
I am trying to publish a page post with multiple photos via the Facebook's graph api.
Currently from the docs and another question here it's stated that the photos should be uploaded separately and then publish the post with attached_media parameter.
The photos are uploaded fine without any problem and I get their IDs.
The issue is that the request for publishing the post gives:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "SOME TRACE ID"
}
If I remove the attached_media parameter from the request the post is published fine.. Any Idea what can be the issue?
Specially for CBroe here are the reqiests:
For the photo upload:
endpoint: /{page-id}/photos
payload:
{
"url": "some-image-url",
"caption": "Some image caption",
"published": false
}
endpoint: /{page-id}/feed
payload:
{
"message": "Some post message",
"published": false,
"attached_media": [
{"media_fbid": "PHOTO_ID_RETURNED_FROM_THE_ABOVE_REQUEST"}
]
}
The payload is send as json to the endpoint. This request works only if I remove the attached_media parameter.
TL;DR
Add publish_to_groups permission to the access token and the request for the post should be with parameter published: true. It appears to have a bug in the graph api or lack of information in the official docs.
Details:
Currently in order to publish a page post with multiple photos you will need to:
upload individually the photos and obtain their IDs
use PAGE access token which contains publish_to_groups permission
attach all photo IDs with attached_media[0..N]: {"media_fbid": "PHOTO_ID"}
currently the request for publishing the post fails if it's with parameter published: false, so it needs to be published: true
All of this does not make really sense to me, so I opened a bug report in the developers platform of Facebook. It does not looks right during development of the App to publish live posts to the page...
I'll edit the answer once I have a feedback.
I'm new in facebook graph API. I easily post upload in FB's pages. But I want to upload in a timeline. But I got an error.
Request :
POST API
https://graph.facebook.com/v3.0/me/photos?access_token=<user_accessToken>&url=https://www.facebook.com/images/fb_icon_325x325.png&caption=Test photo upload
Response :
{
"error": {
"message": "(#200) This endpoint is deprecated since the required permission publish_actions is deprecated",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "A6EzpIcMC9-hZcDlTPA6iPG"
}
}
Please, Explain to me How can I upload a post in the timeline.
Ref., https://developers.facebook.com/docs/graph-api/photo-uploads/
Posting to the user profile is not possible anymore, as the error message tells you. There is no API for it anymore, you can only use the Share Dialog: https://developers.facebook.com/docs/sharing/reference/share-dialog
Changelog with deprecation info: https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#4-24-2018
I'm trying to publish a post on my wall with two photos as attachments using Graph API Explorer.
Here's what i did:
I have selected all permissions in my user access token, and am using v2.5.
I have previously uploaded a photo to the endpoint: /me/photo and in response i got its id. i.e. "10154656374686756". This id will remain active for the next 24 hours.
Then I'm passing the photo id as a parameter (that i got in step 2) to my post using endpoint: /me/feed like this:
Graph API Explorer - Post Request
But in response i'm getting the following error instead of the newly created post id:
{
"error": {
"message": "(#10) Application does not have permission for this action",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "BzOCZ1z3tUH"
}
}
I can't figure what i'm doing wrong here. Your help will be much appreciated.
When I send a request with is_hidden (to hide a post), I get an error response:
{
"error": {
"message": "(#100) Cannot hide/unhide story posted by page itself",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "FJk5AKOr+mU"
}
}
And when I send request with timeline_visibility hidden, then "Facebook posts" is showing hidden by post id, but still showing on Facebook page. How can I hide the Facebook posts?
Whenever I try to delete a comment made to a Wall post originating from FB I get the following error:
{
"error": {
"message": "(#1705) Selected wall post for deletion does not exist.",
"type": "OAuthException",
"code": 1705
}
}
Now this doesn't make any sense since the comment has can_remove attribute set to true, and I can delete any comment made to a post by the app, only the comment to a post which was posted in FB isn't deletable. Any ideas?