Showing posts with label facebook. Show all posts
Showing posts with label facebook. Show all posts

Thursday, 25 April 2013

Get Facebook Comments details by ajax request.

      var url = "http://getpaidtomeme.com/image.aspx?imagenum=15195";
      $.ajax({
            url: "https://graph.facebook.com/comments/?ids="+url+"",
            dataType: "jsonp",
            success: function (data) {
                 alert(JSON.stringify(data));
            },
            error: function (data) {
                consol.log(data);
            }
     });

Just change url here.

Live Demo



Saturday, 20 April 2013

Get number of likes on page from facebook by ajax request.

You can get number of likes of page from facebook by ajax request

Here is example
$.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "http://graph.facebook.com/https://www.facebook.com/Cyprusjetset",
            dataType: "json",
            success: function (data) {
                alert(data.likes);
            },
            error: function (result) {
                alert("Sorry no data found.");
            }
});