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
Related
Am testing this method via Facebook graph api explorer
https://developers.facebook.com/tools/explore
i chose my user and give him access to pages_messaging read_page_mailboxes manage_pages
then choose certain page and method {conversatio_id}/messages with POST request
and send parameter
message: "test test"
I got this response
{
"error": {
"message": "(#210) This call requires a Page access token.",
"type": "OAuthException",
"code": 210,
"fbtrace_id": "C+Xo8LCuuLW"
}
}
Facebook reference
https://developers.facebook.com/docs/graph-api/reference/v2.10/conversation/messages
This is issue reported in Facebook API and fixed now!
https://developers.facebook.com/bugs/261578841015508/
Is it possible to comment on any post using the id of the post ? I tried with the V2.9 and the comment is successful but when I tried it with V2.10 it shows me the following error
{
"error": {
"message": "(#3) Publishing comments through the API is only available for page access tokens",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "B7DlJt0HMOL"
}
}
This is what I did in the Graph api Explorer
When I switch the version to V2.9 the comment in the post is successful. Why does this happen or how can I fix it?
The error message tells you what the issue is, commenting on everything else than Page posts is deprecated since v2.10 and will not work anymore:
90-Day Breaking Changes
POST and DELETE /{comment-id} — This node now requires a valid page access token.
For more information, take a look at the changelog: https://developers.facebook.com/docs/graph-api/changelog/version2.10
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.
I will upload a photo to my page as a page admin. If I use graph explorer it post photo with my account. For example I'm masterweblab on facebook and a page called PAGEMWL. I want upload photo on PAGEMWL's timeline as PAGEMWL. Can you help me?
Update:
When i try to use my app token and get access token to post field facebook return me an error like this:
{
"error": {
"message": "(#200) User must have accepted TOS",
"type": "OAuthException",
"code": 200
}
}
You need to make sure you are uploading the photo with a page token rather than a user token.
Please refer to the documentation for more information.
I wanted to publish a link on the given profile on Facebook via the app. Post to https://graph.facebook.com/PROFILE_ID/links with access_token and other necessary parameters.
For testing purpose, I got the access_token with Graph API Explorer and had the publish_stream and share_item extended permission.
Then I got the error
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104
}
}
I tried fb_id and fb_username for the PROFILE_ID but got the same error. Anything wrong?
Thanks
Yes. /links is read only. To create a link, you need to POST to /USER_ID/feed.
https://developers.facebook.com/docs/reference/api/user/#links