Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook graph api create unpublished post

I am trying to use the graph API (in javascript) to create an unpublished page post. XXXX is a valid page id.

var pagefeed ="/" + XXXX + "/feed";
FB.api(pagefeed, "POST", {"message": "hello", "published" : false},  function     (response) {  
// handle response
});

This gives me an error: {"error":{"message":"(#200) Unpublished posts must be posted to a page as the page itself.","type":"OAuthException","code":200}}

I tried adding the "name" and "id" of the page as parameters of "from" field, but that did not help. What do I need to pass for this call to work?

like image 837
user3345117 Avatar asked Jul 02 '26 12:07

user3345117


1 Answers

You've probably figured this out by now, but for anyone else having this problem: the correct param name is "is_published", not just "published".

like image 163
Pavel Pichrt Avatar answered Jul 05 '26 01:07

Pavel Pichrt