Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook fan page feeds
    text
    copied!<p>I want to include a widget where the user will add a url of the facebook fan page and he shoudl be able to get all the feeds or the recent feeds from the particular page and it will displayed in a box like facebook fan box. But it should. How do I do that.I was able to do that for only one particular facebook page. It should be added dynamically. so each user can enter a different facebook fan page link and he should be able to get it.</p> <p>Thanks alot </p> <pre><code>&lt;!DOCTYPE HTML&gt; </code></pre> <p> </p> <p>Facebook feed </p> <pre><code>&lt;script src="jquery.ui.core.js"&gt;&lt;/script&gt; &lt;script src="jquery.ui.widget.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ 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 Baseurl = "http://graph.facebook.com/"; var search= $("fburl").val(); //Use jQuery getJSON method to fetch the data from the url and then create our unordered list with the relevant data. $.getJSON(Baseurl + search + "feed?limit=5&amp;callback=?",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;"; //A little animation once fetched $('.facebookfeed').animate({opacity:0}, 500, function(){ $('.facebookfeed').html(html); }); $('.facebookfeed').animate({opacity:1}, 500); }); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" value="facebookurl" name="facebook_feeds" id="fburl"/&gt; &lt;input type="submit" id="submit" /&gt; &lt;div class="facebookfeed"&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

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