[英]change the facebook login image
I am using facebook login on my site. 我在我的网站上使用Facebook登录。 Everything is working using the facebook button.
使用facebook按钮,一切正常。 I would like to change the graphic image to be my own image.
我想将图形图像更改为我自己的图像。 How can I change this?
我该如何更改?
I currently am using the following to display the button. 我目前正在使用以下显示按钮。
<fb:login-button v="2" size="medium" onlogin="FB_ConnectPostAuthorization()">Facebook</fb:login-button>
Once again, all I want to change is the picture itself. 再次,我要更改的只是图片本身。
You can do this by using CSS 您可以使用CSS来做到这一点
Frist: hide image button 第一拳:隐藏图片按钮
#RES_ID_fb_login_image {
display: none;
}
second: add our custom image as background for connect link 第二:将我们的自定义图片添加为连接链接的背景
.fbconnect_login_button {
background: url('http://www.iconfinder.com/ajax/download/png/?id=60824&s=24') no-repeat;
display: inline-block;
height: 24px;
width: 24px;
}
That's all :) 就这样 :)
It is possible to do. 有可能做。
This is code of button: 这是按钮的代码:
<fb:login-button id="fb_butonek" scope="email">Login me</fb:login-button>
Place this to bottom of your CSS file: 将其放在CSS文件的底部:
#fb_butonek a
{
background: url("__URL_TO_IMAGE__") no-repeat;
width:247px; /*my image width*/
height:42px; /*my image height*/
}
#fb_butonek a span
{
border:0px none;
background: none;
display:none;
}
In short you can't . 简而言之你不能 。 If you want to use that FBML tag then you are stuck with that image.
如果您想使用该FBML标签,那么您将无法使用该图像。 The other option is just to redirect the user to:
另一种选择是将用户重定向到:
http://www.facebook.com/connect/uiserver.php
?app_id=APPID
&next=RETURNURL
&cancel_url=CANCELURL
&perms=publish_stream
&fbconnect=0
&canvas=1
and they will be returned to you web page when they login (use the return URL as your site) 并且他们将在登录时返回到您的网页(使用返回URL作为您的网站)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.