I want to post something in my FB feed wall (not any Page) using graph API. The Permissions:
pages_show_list instagram_content_publish pages_read_engagement pages_read_user_content pages_manage_posts pages_manage_engagement
User or Page: User Token. Thus I generated the Access Token.
Next I am using the curl:
curl -X POST "https://graph.facebook.com/v20.0/me/feed" \ -H "Content-Type: application/json" \ -d '{ "message": "some msg", "link": "some link to an image", "published": "true", "access_token": "the access token I got as mentioned above"
And I am getting this error:
}' {"error":{"message":"(#200) If posting to a group, requires app being installed in the group, and \\\n either publish_to_groups permission with user token, or both pages_read_engagement \\\n and pages_manage_posts permission with page token; If posting to a page, \\\n requires both pages_read_engagement and pages_manage_posts as an admin with \\\n sufficient administrative permission","type":"OAuthException","code":200,"fbtrace_id":"AT-wsNX19z1oFPFxq0tbLZF"}}%
What I do not understand about the error message is that I am trying not to post in any group/page, but just my FB feed wall.
But later, I decided to create a Page, and try posting there. The code I used to get the Page is:
url -X GET "https://graph.facebook.com/v20.0/me/accounts?access_token=theaccesstoken >>> [{"access_token":"some access token, I am not sure what this is","category":"Property","category_list":[{"id":"198327773511962","name":"Property"}],"name":"MyTest","id":"394143863782471","tasks":["ADVERTISE","ANALYZE","CREATE_CONTENT","MESSAGING","MODERATE","MANAGE"]}],"paging":{"cursors":{"before":"QVFIUkVZASmx4RXhWemFZAX19pOGZALaTZAfMVJlTUtpaXZALMVlucnZAhVnc4WktZAV1hYUm1JTjE4NW5EOUdCYjRoTGRnLU1xSl9VZAi1qZAy1wbVJ6UWJ1cENHaXRR","after":"QVFIUkVZASmx4RXhWemFZAX19pOGZALaTZAfMVJlTUtpaXZALMVlucnZAhVnc4WktZAV1hYUm1JTjE4NW5EOUdCYjRoTGRnLU1xSl9VZAi1qZAy1wbVJ6UWJ1cENHaXRR"}}}
I assume that 394143863782471 is the page_id as yes the name of my page is MyTest.
Then I used from here:
curl -X POST "https://graph.facebook.com/v20.0/394143863782471/photos" \ -F "source=@/path to my image" \ -F "caption=some caption" \ -F "access_token=the access token of the app >>> {"error":{"message":"(#200) The permission(s) publish_actions are not available. It has been deprecated. If you want to provide a way for your app users to share content to Facebook, we encourage you to use our Sharing products instead.","type":"OAuthException","code":200,"fbtrace_id":"AWHagdudbcBgpKNO6yPYM73"}}%
I cannot understand what this error means. Can someone help?