How to use the FB Graph API to post a note on a company page

My personal FB account is in the Admin Role of "Manager" on our company's FB page.

I have an Access Token w/ the correct permissions that I can use to successfully post a Note to the Company page using the REST API.

However, when I use the same Access Token to Post a note to https://graph.facebook.com/PROFILE_ID/notes (where PROFILE_ID is replaced with the ID of our Company page, it posts the note to my personal FB page.

How do I use the Graph API to post notes to the company page.

Thanks!

Answers


POST requests generally seem to post to the profile of the user that is authenticated, not necessarily the user with the profile ID supplied - it's odd.

Hence, you need to authenticate as the page, rather than as yourself. The details regarding this are here: https://developers.facebook.com/docs/authentication/pages/

Essentially, you authenticate as yourself, retrieve a list of pages that you manage with associated access tokens, which you can then use to post the note.

For the benefit of other users, the process is thus:

Firstly, acquire the create_post permission, as described in the API Reference A POST request must be issued to https://graph.facebook.com/PAGE_ID/notes?message="MESSAGE_BODY_TEXT"&subject="NOTE_SUBJECT"


Need Your Help

Meteor - display collection with conditions

javascript meteor meteor-blaze meteor-helper

I have a user based Meteor application with a collection representing groups.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.