Skip to content

Instantly share code, notes, and snippets.

@bingomanatee
Created July 5, 2012 20:17
Show Gist options
  • Save bingomanatee/3056197 to your computer and use it in GitHub Desktop.
Save bingomanatee/3056197 to your computer and use it in GitHub Desktop.
fb reg
<div class="auth">
<script language="javascript">
$(function(){
var root = $('#fb-root');
if ((!root) || (!root.length)){
$('body').append('<div id="fb-root"></div>');
}
window.fbAsyncInit = function() {
console.log('fbAsyncInit');
FB.init({
appId : '3333333', // App ID
channelUrl : 'http://www.wonderlandlabs.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
})
</script>
<div
class="fb-registration"
data-fields="[{'name':'name'}, {'name':'email'}, {name: 'bio', description: 'your public biography', 'type': 'text' }, {'name': 'admin_bio', 'type': 'text', 'description': 'bio for site owner - only visible to the site owner'}]"
data-redirect-uri="http//www.wonderlandlabs.com/member/reg">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment