The method you use is the login button from the Facebook Javascript code. However, you can write your own JavaScript code function to mimic the functionality. Here's how to do it -
1) Create a simple anchor tag link with the image you want to display. Have an onclick method for the anchor tag that actually does the real job.
<a href="#" onclick="fb_login();"><img src="images/fb_login_awesome.jpg" border="0" alt=""></a>
2) Then we create a Javascript function that displays the actual popup and will receive full information about the user if the user permits. We also process the script if the user disables our facebook application.
window.fbAsyncInit = function() { FB.init({ appId : 'YOUR_APP_ID', oauth : true, status : true,
3) We are done.
Please note that the above function is fully tested and working. You just need to put your APP id on facebook and it will work.
Sachin Khosla Mar 21 '12 at 19:25 2012-03-21 19:25
source share