Capture facebook comment after posting - comments

I'm having a Facebook commenting section on my project. It works fine, I'm just wondering if I can capture the comments right after its posted so I can save the comment's content in my database?
Is there a way to capture 'post comment' event?

Take a look at Edge Events, specifically comment.create:
FB.Event.subscribe('comment.create', comment_callback);
Source: https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/v2.6

Related

Facebook comment using ajax/django site

I have just one trouble adding fb comments box in my site. I use kust one url and read the content of the site using js. I put in the head the init of my fb app but I have three post in the main page and I want one comment box for every post. To load the comments of my post I use ((myurl)){{post.id}} to make unique the comment box. This url dosen't exist. But show me up difference comment for every. But don't let me moderate.. I mean dont show the moderation tool. But if i change the href of the post to my url real. Show me the noderstion tool but the same comments in every posts. Any idea???
The page is by ajax bwcause is a radio station and need to listwn the station y all contwnt. There is any way to assign thw url "manualy" in thw api of fb?

Tumblr: how do I remove the description/sidebar box on the submit page in the default Peter Vidani theme?

I have a tumblr account that has submission enabled, and I have a short description with a form in the "description" area that appears on the sidebar. However, this description also appears on myblog.tumblr.com/submit. I'd like to remove it.
I looked at the documentation on http://www.tumblr.com/docs/en/custom_themes#navigation, but haven't been able to figure out how to prevent the sidebar description from showing at the top of the submit page.
Can anyone help?
I'm not sure if I understood your question correctly. But if I did, a work around would be using jQuery to check if the current url contains the string /submit and simply disable the sidebar, or the element that contains the description.
I don't know jQuery but I know it's possible. I'd suggest you to look into this post:
How to check if the URL contains a given string?
and combine it with this line (replace the "alert part")
$("#sidebardescription).hide();
Another solution would be if Tumblr provided you with a way to only render for specific pages. They usually do that. I'd look into this part {block:SubmissionsEnabled} {/block:SubmissionsEnabled} before I go with the workaround.

MVC3 How to implement result browser like twitter/facebook do it (without paging)

I'm looking for leads on how to implement a (search-)result browser without using paging. But more like how twitter/facebook do it.
At first only 10 or so results need to be displayed but when scrolling down, more results (if any) should be added asynchronously. I've found examples with a [more] button at the end but I would like the browser to automatically fetch more when the bottom of the pane is reached.
I'm having trouble finding the right examples. Probably because I don't know what keywords to google on...
Hope you can help me out in the right direction!
Kind regards,
Paul
I advise you read following article regarding this subject:
Infinite Scroll in ASP.NET MVC
There is also a sample application available here.
Refer to the Replace paging with jQuery and subsonic continuous scrolling method blog post.
Have a look at the following pages:
On Scroll down how to make ajax call and get the respone data
create-a-dynamic-scrolling-content-box-using-ajax
I believe that should help you!

How to put divs for text field and button in one line for mailchimp signup form that is in a table?

I've been trying to amend the code provided by Mailchimp which is included on a site I'm developing for the mailing list form.
Basically the code is included within a table and the Mailchimp code is in one cell of the table. The content is title, box to enter email address and "Submit" button. I would like to amend the code so that the contents of the cell are all on one line rather than under each other as is the current case.
The code and CSS can be found here http://jsfiddle.net/surfersteve1970/x9QLP/
Hopefully I've just done something stupid, as is often the case, but after hitting my head on my desk for the last hour I thought it best to try and ask for some help rather than cause further brain damage.
Thanks in anticipation of any help.
Steve
http://jsfiddle.net/iphipps/CLFBj/1/
Both the email and button inputs were being displayed as block and not floated or displayed inline. The code below worked for me.
#mc_embed_signup input.email{
display:inline-block;
}
#mc_embed_signup input.button {
display:inline-block;
}
Note: in the attached jsfiddle, I changed the display on both selectors, then added the code below after a comment. For some reason jsfiddle doesn't seem to like css cascaded overrides.

"facebook comment id" added to url - inconveniently

A user comments on the page, the comment is posted to their facebook wall. When another facebook user clicks the link to see the comment it links back to the page but with a massive string of numbers on the end.
http://canofclouds.com/thought/?fb_comment_id=fbc_10150505683457013_20914817_10150507783662013#55
The original url was: http://www.canofclouds.com/thought/#55
This is all fine so far though, until the user clicks a button to go to
http://www.canofclouds.com/thought/#56
Instead, it goes to:
http://canofclouds.com/thought/?fb_comment_id=fbc_10150505683457013_20914817_10150507783662013#f25e670a6c
Which is not good - because it doesn't exist. Ideally it would just go to http://www.canofclouds.com/thought/#56
Normally, when the user clicks the next button a flurry of javascript grabs the hash key (in this case #55) then adds 1 to it (to make #56 - yay) and executes an ajax call to grab the new content. This facebook stuff is making things a little complicated though.
Any ideas?
Edit: Even more ideally i could disable the 'fb comments id' altogether.
You shouldn't use hash keys to link to your page. You should use a canonical URL to do so.
There are a few questions here on stack overflow about how to deal with this.
The only way around it if you choose not to make canonical urls, is to do URL Rewriting at the network or web server level.

Resources