Check if page allowed comment reply in Facebook - facebook

As you might know Facebook enabled this "reply on comment" feature recently. And if you have a page, you will find a checkbox in settings saying Allow replies to comments on my Page. This means that some pages could have turned this feature off.
So now I have to integrate Graph API requests in my website to post replies. I was wondering if there is a way to get if the page has enabled replies or not. Because if I post reply on a comment which does not support it, I'll get an exception.
To overcome this, I'd like to know a priori if the feature is enabled and do not allow to reply from my site if it is not.
I looked into FB docs, but couldn't find anything. Also there is a "can_comment" field in every comment object. Can it be used instead?

Related

Comments Social Plugin Comments not posting on wall

I am currently trying to use the Facebook Comment Social plugin for comments on my site. Almost everything works, the comments can be seen by people on the site and also viewable using http://developers.facebook.com/tools/comments. And the "Post to Facebook" checkbox is checked. However, the comments are still not posted on the news feed or wall or anything at all of the person commenting.
"Make every post public by default". setting is selected on moderator. and the is present in all pages.
Why is that? Have I missed anything? Please help...
Note: I cannot give the URL of the site since it is not yet uploaded to a public server and am just testing it on my PC with the router on port forwarding. I think the router is properly configured since my friends can access the site given the proper IP address.

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.

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.
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

How do I get Facebook Connect to alert me when people comment on my blog?

I'm using Facebook Connect's "Comments Box" (http://wiki.developers.facebook.com/index.php/Comments_Box) to handle comments on my blog. However, there doesn't appear to be an easy way to find out when people comment - ideally I'd like to receive an email whenever it happens, but I'd settle for an RSS feed or similar.
Is there an easy way to set this up?
Officially as an admin you can enable "notifications" but these are just the passive things that show up when you log on to Facebook itself - I rarely do this, and anyway it doesn't seem to work for anonymous comments.
You need to hook up the onComment event to ping you. Take a look at the bottom of the http://wiki.developers.facebook.com/index.php/Comments_Box page where they specify the FB.CommentClient.add_onComment callback.
Depending on your blog api, you could have the onComment callback make an ajax call to your blog, so then the blog server emails you. We'd need more details to help you there.
You can now add yourself as a Moderator, and then you'll get notifications via Facebook's own notifications system.
https://developers.facebook.com/tools/comments
Here's a detailed description of how to set it up if you have your own PHP-capable server. It's about adding Facebook comments to Tumblr, but I think the email notification part will work equally well with non-Tumblr blogs.
http://gallery.lifewithboys.com/tumblr/_article/add_facebook/index.html
//Lars

Submit comments from my website to the users facebook wall

Currently on my website - I have a form which users use to post comments on the website. I want to add an extra check box - that says "Post to my facebook" wall.
So if they check that - the comment they post on my website - should also be posted on their website. They should not have to type the comment again.
How do I go about it?
You'll need to use connect as steve mentioned, specifically the FB.Connect.streamPublish method. I think what you really want to do post your link as a shared stream item, and use the user's comment as the user_message field. The attachment's description would probably be something like "I commented on this article".
Facebook Connect, which is largely a javascript-enabled connection between your site and Facebook, is the answer.
http://developers.facebook.com/connect.php
Not terribly difficult to implement, but you need to be savvy with Javascript. And if you've got your own user membership db (as you likely do), you'll need to wire up the links between your users and facebook id's.
I believe what you are looking for is the comments box, coupled with Facebook Connect it should accomplish what you want.