Skip to content

Instantly share code, notes, and snippets.

@clarkieryan
Created February 4, 2014 16:16
Show Gist options
  • Save clarkieryan/8806858 to your computer and use it in GitHub Desktop.
Save clarkieryan/8806858 to your computer and use it in GitHub Desktop.
Simple JQuery gallery using the FB API.
You need to add in the dependancies for fancybox http://fancybox.net/
And ensure that JQuery is included to the module,
Facebook part
You need an appID which you can register for via developer.facebook.com
You can use what's called a channel which allows for a caching some scripts.
You need to find the pageID of the page you are calling
You can set all of these are the start of the script.
Any questions drop me an email
<!--- Loads in the Javascript API Library -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment