Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically posting Facebook comments

My application has obtained publish_stream permissions for a Facebook user.

I'd like to allow the user to post comments for a target URL directly from my mobile application, rather than opening up an embedded browser that then shows the Comment Box plugin. That is, the user doesn't necessarily want to post the link to their feed -- rather they want to participate in any Facebook comment discussion that surrounds that URL.

Naturally, I can read the comments for any URL via the Graph API (eg: a techcrunch article) but I do not know how, or if I can add comments to an arbitrary URL programmatically.

Would love to hear any other suggestions or workarounds as well. My hope is to piggy back on Facebook comments to allow my users to have a conversation surrounding URLs of interest to them. If at all possible, I'd also prefer to use Facebook, though I can see using Disqus or similar services would be another possibility.

like image 568
kbs Avatar asked Jul 22 '11 22:07

kbs


People also ask

Can I post on Facebook using API?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

What is Fbtrace_id?

fbtrace_id : Internal support identifier. When reporting a bug related to a Graph API call, include the fbtrace_id to help us find log data for debugging.

How do you comment on API?

Comment API overview Generally speaking, only two functions you need to know to get comment API worked: Use comment::init to initialize Comment API. Use $comment->output to display comments.


2 Answers

Use graph api, demo comments here

make POST to

http://graph.facebook.com/comments/?ids=http://techcrunch.com/2011/07/22/big-surprise-the-ipad-trumps-android-tablets-at-the-office/

with field message and value "yourmessage"

like image 152
genesis Avatar answered Oct 19 '22 07:10

genesis


I genuine Facebook API bug. Cannot comment via Graph API on Comments Plugin (Probably try Legacy API)

Graph API

like image 24
rjdthegreat Avatar answered Oct 19 '22 07:10

rjdthegreat