I'm posting some info to a user's wall via Facebook Connect (from my external website).
All working good, but i've noticed some differences in the documentation for wall posts in the Graph API and the Old JavaScript SDK.
With the Graph API, to post to a user's wall you do the following:
This is all detailed on this page: http://developers.facebook.com/docs/reference/api/post
Now, contrast this with the FB.Connect.streamPublish method (old JavaScript SDK):
The client-side JavaScript function takes the following parameters:
This operation is detailed on this page: http://developers.facebook.com/docs/reference/oldjavascript/FB.Connect.streamPublish
Now, the operations in the Graph API vs the old JavaScript API are very similar, apart from one important parameter - "action_links".
From the link above:
A dictionary of Action links objects, containing the link text and a hyperlink.
Essentially, this allows you to create extra links alongside the "Comment" and "Like" buttons beneath the wall post. This is what i want to do, i.e i want to have another button called "Do something on MySite".
Why can i not do this using the Graph API??? WTF Facebook, why would you create a new, "RESTful" API that doesn't have all the functionality of your legacy API?
What annoys me is that the "Feed" object does have the collection of "action links" in the JSON (if you were inclined to request this info).
But it's almost like Facebook have removed the ability to create action links using the Graph API. Is that what has happened??
Am i missing something here? I really do not want to have to replace the Graph API calls with using the Old JavaScript API.
Please help!
EDIT:
Well, well well, look what i found: http://bugs.developers.facebook.com/show_bug.cgi?id=11257
It appears there is a 'bug' where the Facebook Graph API does not support Action Links.
When did the definition of a 'bug' become 'something we left out'?
Sigh, back to the old JavaScript SDK.
Facebook, i loathe thee.
Facebook has added this to the graph api now, with the "actions" parameter. See this link for documentation:
Facebook Graph API Post to Feed Method
There is no "Graph API" solution to this problem - as a bug has been filed with Facebook Developers (see my above EDIT).
The only current solution is to revert to the old REST API or JavaScript API to do the posting.
Ridiculous stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With