I am trying to use a combination of JS-SDK and PHP for my Facebook API implementation. What I would like to do is, attach my custom handler when someone clicks on the following:
<fb:login-button size="medium">
Connect with Facebook
</fb:login-button>
I know I can use a static image with the same facebook logo and wrap it in a <a> with my javascript code, but I would really like to use the fbml button because it can scale so well and the text in the button can be easily manipulated. I would like to avoid copying the entire CSS and duplicating the effort also if I can.
In other words, I would like something like this:
<script>
function doLogin() {
window.open('login.php', 'Login to FB);
}
</script>
...
<fb:login-button size="medium" onClick="doLogin();">
Connect with Facebook
</fb:login-button>
Is this at all possible or am I SOL?
The latter. Even if it were possible it’s against Facebook’s TOS to imitate, let alone exactly reproduce their graphics.