Home How to publish from Facebook App to Facebook Page from node.js?
Reply: 0

How to publish from Facebook App to Facebook Page from node.js?

SilentImp Published in 2018-01-11 19:16:55Z

I have lost in the facebook token-hell. Help me, please.

  • To get App token I need GET https://graph.facebook.com/v2.11/oauth/access_token?client_id=${process.env.FACEBOOK_API}&client_secret=${process.env.FACEBOOK_CLIENT}&grant_type=client_credentials — it's OK and work. I got APP token.
  • To post on FB Page from the name of the Page I should POST https://graph.facebook.com/${process.env.PAGE_ID}/feed?message=Hello&access_token=${token} — and got this (page is unpublished):
{ error: 
   { message: 'Unsupported post request. Object with ID \'2323423423423234\' does not exist, cannot be loaded due to
missing permissions, or does not support this operation. Please read
the Graph API documentation at
     type: 'GraphMethodException',
     code: 100,
     error_subcode: 33,
     fbtrace_id: 'G+ZYHcOA5Pu' } }
  • I presume that I need extended permission called manage_pages from page administrator. And I have no idea how to get it from node.js with http request and with no user. App in the DEV mode. Page is unpublished. How I may get this permission? May I have app as admin for page? I wont to avoid user interactions. Just setup some predefined tokens and start working.

And, yes, I want to do it on the level of http requests, not the on the level of fancy framework who has wrote some no-name.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.496137 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO