How to post on a Facebook group as a Page, using the Graph API Explorer? - facebook

I am the administrator of website, a Facebook group, a Page and a Facebook API. I would like to create, once a day, a post on my Facebook group using my Page name as author AND using the Graph API Explorer. Is it even possible?
To start simply, I use the Graph API Explorer directly but it fails to create the post.
https://developers.facebook.com/tools/explorer/
For the moment, I have tested the Graph Explorer with these data and parameters:
Request:
post/v15.0/{my_group_id}/feed?message=test
Settings:
Application Meta: My app
User or Page: My Page
Permissions: pages_show_list, publish_to_groups, pages_read_engagement, pages_manage_posts, public_profile
{
"error": {
"message": "Permissions error",
"type": "OAuthException",
"code": 200,
"error_subcode": 1376025,
"is_transient": false,
"error_user_title" => "No Permission to Post"
"error_user_msg" => "You do not have permission to post in this group."
"fbtrace_id": "xxx"
}
}
I'm not sure if I'm doing something wrong or if it's just impossible?

Related

What is the permission scope of publishing a post users wall in Facebook Graph API?

I published a post to page successfully by using Facebook Grap API over postman tool.
There are informations below for publish post in a page:
Post Request: {{url}}/{{pageId}}/feed?access_token={{page_access_token}}&message=This is a test
Scope: pages_manage_posts,pages_read_engagement,pages_read_user_content,pages_show_list
But I want to publish a post to user's own timeline (other says user's wall).
I explore this link https://developers.facebook.com/docs/graph-api/reference/post#Creating
They wrote this: You can publish posts by using the /{user-id}/feed, /{page-id}/feed, /{event-id}/feed, or /{group-id}/feed edges.
Then I used below informations for a publishing a post on user's wall.
Post Request: {{url}}/{{userId}}/feed?access_token={{user_access_token}}&message=This is a test
Scope: pages_manage_posts,pages_read_engagement,pages_read_user_content,pages_show_list
After trying it didn't work. Response is:
{
"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": "*****"
}
}
{{url}} are tried as https://graph.facebook.com and https://graph.facebook.com/v14.07
Which scopes, url and path should I use?
How can I achieve this?
Thank you

unable to post on facebook photos to groups and pages via graph-api

my app is in development
i am using below permissions:
"public_profile",
"publish_video",
"pages_show_list",
"pages_read_engagement",
"pages_manage_posts",
"publish_pages",
"user_managed_groups",
"groups_show_list",
"publish_to_groups",
"groups_access_member_info",
"publish_actions"
but on trying use the api to post photo in group and page i get below errors
https://graph.facebook.com/v12.0/{page-id}/photos?access_token=={token}&url={url.jpg}
error:
{
"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": "AW4L8qJL7HJWz9oTL7rk1IY"
}
}
https://graph.facebook.com/v12.0/{group-id}/photos?access_token={token}&url={url.jpg}
error:
{
"error": {
"message": "(#200) Insufficient permission to post to group",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "AsV2H45AICb6G7D73aiedW4"
}
}
Can someone please help with this
Solution for page post
follow this url for details: access_token
using user access token get page access token, pass this page access token in above url for page post
curl --location --request GET 'https://graph.facebook.com/v12.0/{page-id}?access_token={user-access-token}&fields=access_token'

Post upload in facebook's timeline by Facebook graph API

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

Send messages via Graph API stop working

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/

Facebook Graph API (Post with Photo Ids) - (#10) Application does not have permission for this action

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.