Programmatically posting Facebook comments - facebook

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.

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"

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

Related

Comments box for facebook post

Is it possible to link a Comments Box to a (public) post on facebook?
I've tried several urls for the Comments Box:
graph.facebook.com/postid
permalink
facebook.com/user/posts/postid
none of them worked.
I know I could use the Graph API to get and post comments on the users behalf, but that requires the user to accept my application (which seems a bit like an overkill, just for commenting a post in facebook).
The comments plugin are for outside (of Facebook) URLs only. It is not possible to use the plugin for public posts on Facebook.

Adding facebook comments to my website object

Is there any way I can create comments related to my object, without using the comments plugin? The Facebook Graph API seems like the correct way, but can I link to an object on my web site without actually "posting" that object as a post on facebook? Amazingly, I can't find anyone on the Net with this problem, so perhaps I'm simply doing it wrong.
I'm trying to post to:
https://graph.facebook.com/comments/?ids=http://iesgroup.ca/myappbeta/Item/1799633&message=test&access_token....
I do have the publish_stream permission in the access_token. All I get back is "An unknown error has occurred".
Essentially, I have set up my own web site using the Open Graph protocols. Each item that I have has its own URL with the proper OG tags. For each item, I am able to fetch the comments that facebook has associated with it. But I am unable to actually attach new comments to that object, without using the facebook comment plugin. I'm using my own look-and-feel commenting system, so I am not interested in using facebook's module. I'm using the JavaScript API to fetch the existing comments.
Note, that if I use the Open Graph protocol, users are able to post actions to their timeline, but not actually associate new comments to the object.
Thoughts? Thanks.
The only way I know of is to use the Facebook Graph API and have a Facebook website application and use server-side code to directly re-post comments from your website to the facebook page on an existing Facebook object. It is much more in-depth than the simple Open Graph implementation. But if you don't want to use Facebook's comment module, I don't see any other option. This is a link to the area of making comments, http://developers.facebook.com/docs/reference/api/Comment/ , but this is only useful after you have everything else set up. This is a huge undertaking to get your website to this point, but you will have full control over every aspect of how you interact with Facebook, cause you write your own code. Here is a link to the top level of the FB Graph API so you can read more about it. http://developers.facebook.com/docs/reference/api/
Nick - www.meltedjoystick.com

Sharing links posted to a wall via an app

I've created an app which enables business to post links to their Facebook wall as the business (have proper business auth tokens, etc.).
However the links posted via the app do not have a share link, only comments and like. When a link is posted through the Facebook UI to the business wall it does contain a share link along with comments and like.
What am I missing to enable the link posted via my app to have a share link?
I am currently issuing a POST request to the following URL to create the posts:
https://graph.facebook.com/[profileId]/feed?message=[message]&link=[link]&...
this is a reported bug and have not been fixed yet. have a look (http://developers.facebook.com/bugs/307556529334653)
I think you will need publish_stream permission for that and publish what they write. IMO Facebooks makes difference between feed and stream. Just my thoughts :)
that's the standard procedure when you have a user post via app. I don't think there's a way to have users post as themselves, as far as links are concerned. What you can do is have them post a status update and that one will be seen as posted by the user (no app information).
There's no other procedure I am aware of that can do that. I hope this helps

How to merge comment stream on Facebook events and my own website

I have a website that allows people to post events and it automatically posts their events to facebook if they so choose. I also integrated facebook comments on the event pages on my website.
Is it possible to merge the comments that people leave on my website's event pages with the comments that people leave on the facebook event page that was automatically made for them? I can't seem to find any documentation on this.
Edit: Just to clarify: The comments on my website are done via the facebook-comments API, they are not a module of my application.
Adding a separate answer, as after clarification it's significantly different.
If you want to basically have the wall of your event show up on your website, you can use the Event API to pull in wallposts and display them. To be able to post to that wall, you would have to do some custom coding to authenticate the user with publish_stream permission and then have a form on your site that would post to the event's wall, as noted in the post section of the above link.
Someone may have done this already and put code out there, but I doubt there is an easier way to get your ideal situation up and running. This use case isn't as automagic as the comments box, unfortunately.
If you're just looking to spread your events socially, however, the comments box will post to the commenters' walls with a link to your event page, which can then in turn point them to the Faecbook event. You might be able to use the Facebook event's URL as the URL for your comment box on the website, so it would just post a link directly to the Facebook event, but I'm not sure on that one.
I looked at this in my app, and we ended up deciding to just maintain separate streams. This is because it's only a one-way integration - you can get comments from Facebook via the Graph API and format them on your own website, in-line with your website comments, but there's no way to push comments from your website up to Facebook.
You could, if you wanted, just use the Facebook comment form for all comments - this has been done by big sites such as TechCrunch, and is effective, but it requires users to have a Facebook, AOL, Yahoo, or Hotmail account. Whether you want to do that or not depends on your preferences and userbase.
there a tool that combines comments form different pages or different sources
Check https://feedgun.com which works on pulling comments from different sources like YouTube videos, existing wordpress sites, facebook comments plugins and even DIsqus account and combine them all together and publish them on any of your webpages, and it all works automatically once you set them where to pull and where to publish.

Post Facebook Comment with Link Preview via Facebook API

Facebook recently added link previews to user comments.
http://www.insidefacebook.com/2011/07/21/facebook-comment-previews/
My question: is there a way to display this link preview using any of the Facebook APIs and publish_stream permission? (Graph, rest, etc)?
I've tried posting a URL in the body of a comment using the Graph API /comments endpoint, but no link preview is shown.
The feature might still be too immature to allow this, but I'm wondering if any one has tried it and got it to work in some way.
Sure. Just post a comment (for example) with youtube video and it will transfer to embed one