2

Using Facebook's FBML login button, is it possible to use custom login/logout images?

<fb:login-button 
    autologoutlink="true" 
    onlogin="OnRequestPermission();">
</fb:login-button>
Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Dave
  • 25
  • 1
  • 8

4 Answers4

6

Yes, it is possible, using the JavaScript version:

<a href="#" id='fb-connect-link' onclick="FB.Facebook.init(api_key, channel_path);FB.Connect.requireSession();return false;">
            <img src="/media/default/img/button_facebook.png" alt="F" /><br />Facebook<br />(via Connect)</a>

I used this before and it works.

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Nealv
  • 6,716
  • 8
  • 55
  • 86
  • :) if it hasn't changed in the meantime that is, facebook has some strange policies about changing it's api's – Nealv Aug 06 '10 at 13:53
3

Nealv's answer demonstrates old API. If you want to use new API then you need to call FB.login() method to trigger fb login dialog at any point.

serg
  • 106,723
  • 76
  • 306
  • 327
1

Nope that's not possible, Facebook does not allow that because of its branded icon/image.

If however, you are using JavaScript for that, see the answer of @Nealv.

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Sarfraz
  • 367,681
  • 72
  • 526
  • 573
1

Head over to this answer, I have already explained this and also provided the code. Let me know if it still needs further clarification.

Sachin!

Source : How to change facebook login button with my custom image

Community
  • 1
  • 1
Sachin Khosla
  • 1,696
  • 1
  • 10
  • 11