How to post Facebook Page using the Facebook Graph API node?

Describe the issue/error/question

When trying to post to my company Facebook page using the Graph API, I am getting the following error:
(#200) If posting to a group, requires app being installed in the group, and \ either publish_to_groups permission with user token, or both pages_read_engagement \ and pages_manage_posts permission with page token; If posting to a page, \ requires both pages_read_engagement and pages_manage_posts as an admin with \ sufficient administrative permission

I have verified that the app has the right permissions in the developer portal.

I’m wondering if anyone here has any experience using N8N + the Facebook Graph API to post messages to a Page, and if so what am I doing wrong?

Please share the workflow

Information on your n8n setup

  • n8n version: 0.196.0
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Kubernetes
1 Like

Hey all, I answered my own question.

Turns out I was looking in the wrong area for where to adjust the permissions.

It’ s not the app permissions that needed adjusting but the token in the Facebook Graph API Explorer.

Not only did I need to add the missing permissons here, but I also needed to copy the Page Token instead of the User Token.

Hope this helps someone else.

Thanks,

5 Likes

Thanks so much for confirming @joeldeteves and for sharing your solution! Tbh, the Facebook API really is confusing, I always panic when questions around it pop up :smiley:

2 Likes

Hey @joeldeteves, thanks for sharing your solution. I try to post to my Facebook Page, but it’s really confusing :grinning:

Could you please explain how to properly fill in the data in: Query Parameters Name Value or should I use different approach? :slight_smile:

1 Like

Hello,
I would like to leave you a message because I have the same error.
I would like to post on my groups instead of my pages
I have the same error
However, I have my correct authorizations but I just need to add my app to my group. Except that the app is not published because it is for personal use.
Do you have any idea how to solve my problem?

Hello,
I would like to leave you a message because I have the same error.
I would like to post on my groups instead of my pages
I have the same error
However, I have my correct authorizations but I just need to add my app to my group. Except that the app is not published because it is for personal use.
Do you have any idea how to solve my problem?

Curious if you were ever able to get this working? I’m currently figuring out the same problem.

Alright, I figured it out! Now I did a couple things here so I’m not entirely sure what worked but I’ll list everything and mention the part that I think is the most critical to making this work.

Firstly a few things worth mentioning:

  • My Facebook page is “owned” by my Facebook Business, meaning that I manage everything from: https://business.facebook.com/
  • I verified my business with Facebook; so all verification has been completed.
  • My Facebook App Mode has been set to Live not Developement.

THE CRITICAL PART to making this work:

Being that my App is owned by the business account, I added the business_management to the app permissions. Located here: Graph API Explorer - Meta for Developers

So now when I do the /me/accounts it’ll output data

Next, I take the access_token for the Page that I want to post to and I use that access_token in the n8n. Now, I’m able to post to my Facebook page using n8n with the following settings:

2 Likes

great
Thanks infinitely
:heart: :heart:

1 Like