Facebook Like Box指定图像尺寸

时间:2014-02-12 00:44:23

标签: html css facebook image dimension

当我在gtmetrix上分析我的网站时,我可以看到我在我的网站中包含的facebook likebox iframe增加了facebook喜欢gtmetrix分析,这就是询问指定的图像尺寸。

正如我在facebook css中看到的那样,在检查图像上的元素时,指定宽度和高度为50px。

任何人都可以为此建议一些解决方案。

以下是gtmetrix报告:

http://profile.ak.fbcdn.net/hprofile-ak-ash1/t5/1075891_1447553848794414_2054094003_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-ash2/t5/1117019_100001688588210_43083615_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-frc1/t1/c25.0.81.81/s50x50/252231_1002029915278_1941483569_s.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/1086379_100007611906546_1473945810_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/1086844_100002168445689_1856954293_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/211653_100004667589872_1354932965_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/276037_1082183683_1868771598_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/276384_1437164706_1527432832_q.jpg (Dimensions: 50 x 50)
http://profile.ak.fbcdn.net/hprofile-ak-prn2/t5/372083_100003129221075_1067837842_q.jpg (Dimensions: 50 x 50)

谢谢, 任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:2)

如果您使用facebook iframe插件,即使您无法从I-frame访问任何对象,也无法更改图像大小

same-origin policy

这里我有另一种解决方案......

1.从这里获取XFBML代码:http://developers.facebook.com/docs/reference/plugins/like-box/# 将fb:like-box重命名为fb:fan

2.在您的网站上上传您的css文件

3.将此参数添加到fb标签:profile_id =“您的网页ID”css =“http://example.com/css/your-cutom-style.css?1”

答案 1 :(得分:-1)

Facebook Like Box页面允许用户设置facebook按钮的宽度。您可以阅读更多相关信息here

Facebook like box page

查找您想要的设置