Hubert Schölnast
Hubert Schölnast

Reputation: 8527

Facebook API: Error "(#210) Subject must be a page" when posting a Status Update on a Page

I want to post a simple status update on one of my pages with a perl-script. To find out how to do best, I use facebooks Graph API Explorer https://developers.facebook.com/tools/explorer for experiments

I use the access token of my FB-app. This app is doing a good job since 2 years. The access token will expire in about 2 month and among many other permissions it has the permissions "publish_stream" and "manage_pages".

I select "POST", then, in the field next to "POST", I enter the ID of my page (a 15-digit-number starting with 102 ending with 937). This ID is correct, because I can GET data from this page using exactly this ID.

I click on "Add a field", then I enter the field-name "message" and the value "test-message". Then I click on "Submit". And then I get this result:

{
  "error": {
    "message": "(#210) Subject must be a page.", 
    "type": "OAuthException", 
    "code": 210
  }
}

But posting a comment to an existing posting on the same page works fine. I simply replace the page-ID 102...937 with 501...852/comments where "102...937" and "501...852" are 15-digit-numbers.

What am I doing wrong? What must I do to post a message on my page using the Graph API Explorer? "102...937" is the ID of an existing page. I am managing 3 pages, I have the same problem with all 3 IDs.

Upvotes: 0

Views: 2437

Answers (1)

Hubert Schölnast
Hubert Schölnast

Reputation: 8527

I found the solution:

In the field next to POST I only did enter the Page-ID (like 123456789012345) but you must add "/feed" to the end, like this: 123456789012345/feed

The documentation does not say how to post a status message. To me it was clear, If want to post something on a page, I have to enter the pages ID, not more. And if the error-message would have said "Subject must be a FEED" everything would have been clear. But is said "must be a PAGE" but it already was a page.

Upvotes: 1

Related Questions