Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I got the solution this problem I am including the source code below</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function fbFetch(){ //Set Url of JSON data from the facebook graph api. make sure callback is set with a '?' to overcome the cross domain problems with JSON var facebookname= document.getElementById("fname").value; alert("You are searching for: " + facebookname); var url = "http://graph.facebook.com/" + facebookname + "/feed?limit=5&amp;callback=?"; //var url = "http://graph.facebook.com/jeevan.dongre/feed?limit=5&amp;callback=?"; //alert(url); //Use jQuery getJSON method to fetch the data from the url and then create our unordered list with the relevant data. $.getJSON(url,function(json){ var html = "&lt;ul&gt;"; //loop through and within data array's retrieve the message variable. $.each(json.data,function(i,fb){ html += "&lt;li&gt;" + fb.message + "&lt;/li&gt;"; }); html += "&lt;/ul&gt;"; // $('.facebookfeed').html(html).slideDown(200); //A little animation once fetched $('.facebookfeed').animate({opacity:0}, 500, function(){ $('.facebookfeed').html(html); }); $('.facebookfeed').animate({opacity:1}, 500); }); }; //onload="fbFetch()" &lt;/script&gt; &lt;/head&gt; &lt;body &gt; &lt;center&gt;&lt;h1&gt;Friend's Page Feed&lt;/h1&gt;&lt;/center&gt; &lt;table border=1 width="600px" align="center"&gt; &lt;tr&gt; &lt;td width="200px";&gt; Enter Facebook name here: &lt;/td&gt; &lt;td width="400px;"&gt; &lt;input type=text name="fname" id="fname" &gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;input type=submit value=enter onclick="fbFetch()"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;div class="facebookfeed"&gt; &lt;h2&gt;Content will load here...&lt;/h2&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/body&gt; </code></pre> <p></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload