Possible Duplicate:
Facebook SDK: Replace “Log In” button with custom image
I have this:
<fb:login-button autologoutlink="true"></fb:login-button>
How do I customize the button by it image, size and etc?
if you're using new Facebook JavaScript SDK you can use any element as button - just attach onclick event to that element and invoke FB.login() with necessary parameters.
If you use the Facebook PHP SDK (if you are new, check the example given), you can get the URL to redirect the user to the Facebook login page with :
$fb_login_url = $facebook->getLoginUrl();
You can then include it in your page as a normal link :
<a href="<?php echo $fb_login_url ?>" id="facebook_login_link">
Login with Facebook
</a>
that you can customize with some CSS, for example :
#facebook_login_link {
background: url(my_button_image.png) no-repeat top left;
display: block;
width: 50px;
height: 20px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With