Search code examples
facebookpublish

Facebook publish api parameters, some of them don't seem work


I'm trying to build a FB app which has a function of publishing post with picture to news feed.

I am able to do that via FB's graph api according to FB's developer document,

https://graph.facebook.com/PROFILE_ID/feed

with the parameters such as message, picture, link, name, caption. These are parameters listed in FB's doc. I assumed that these parameters are only for the POST requests.

For posts in FB, we can find more parameters. I assumed they are only for the GET requests.

However, when I tested all these parameters, I found that I am able to add actions to my POST requests and get customized actions. When I try to add message_tags, from, to, these parameters don't work in POST requests.

So, I get confused. Is my assumption correct? Or I did something wrong.

BTW, when I send requests with these parameters, no error message returns. Posts are published to news feed, but no message_tags, from, to.


Solution

  • If you look in the Documentation of the Object you are creating the Post for (the PROFILE_ID), you will get more explicit information about GET and POST API limitations. Here is documentation for Posts to a User:

    http://developers.facebook.com/docs/reference/api/user/#posts

    It says when creating a Post (using the POST method) you can define these properties:

    • message
    • link
    • picture
    • name
    • caption
    • description
    • actions
    • privacy
    • object_attachment