Sunday, June 26, 2011

Fabcebook connect with Custom Image

$(document).ready(function () {

$.getScript(document.location.protocol + "//connect.facebook.net/en_US/all.js");

$("#fb-login-box-div").show();

});

window.fbAsyncInit = function () {

FB.init({

appId: '<%= FBAPIKey %>',

status: true,

cookie: true,

xfbml: true,

logging: true

});

$('#fb_login_bv').live('click', function (e) {

e.preventDefault();

FB.login(function (response) {

//handle your custom logic after redirecting from facebook

}, { perms: "email" });

});

}


//span id="fb-login-box-div">

//a style="cursor: pointer;" id="fb_login_bv">

//img src="imageurl" width="20" height="20" alt="" border="0" />//a>

//span>