3

While i'm analyzing my website on gtmetrix i can see that the facebook likebox iframe which i have includes in my website to increase facebook likes the gtmetrix analyse is asking the specify image dimensions.

As i can see in the facebook css while inspecting element on the image there is specified width and height 50px.

Can anyone suggest some solution for this one.

Here is the gtmetrix report :

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)

Thanks, Any help will be appreciated.

mstojanov
  • 175
  • 4
  • 17

2 Answers2

2

if you use facebook iframe plugin you cant change image size even you cant access any object from I-frame due to

same-origin policy

here I have another solution ...

1.Get XFBML code from here: http://developers.facebook.com/docs/reference/plugins/like-box/# Rename fb:like-box to fb:fan

2.Upload your css file on your web-site

3.Add this params to fb tag: profile_id="ID OF YOUR PAGE" css="http://example.com/css/your-cutom-style.css?1"

Anant Dabhi
  • 10,864
  • 3
  • 31
  • 49
  • I need to specify width and height in html of the the image like `` for GTMETRIX not CSS. – Adrian Oct 04 '14 at 17:41
  • 1
    as the parent states, and you state in your question, you are using an iframe. When you use an iframe you cant change anything inside the iframe - look at the parents link to same-origin policy (unless you have access to the code on the FB servers, and I assume you don't as if you did, you wouldn't need to ask here) – Jonathan Oct 04 '14 at 22:23
-1

The Facebook Like Box page allows users to set the width of the facebook button. You can read more about it here

Facebook like box page

To find the setting that you want

Elliott Frisch
  • 198,278
  • 20
  • 158
  • 249
Ruchi S
  • 31
  • 7
  • where u get it... can u tell me what exactly error n whats ur code?? – Ruchi S Oct 01 '14 at 09:22
  • https://developers.facebook.com/docs/plugins/like-box-for-pages This is the correct link that you wanted to point out, but I am asking for the image faces to set width and height, not for the entire facebook plugin box. – Adrian Oct 01 '14 at 09:37
  • i m sorry... for that.. i had like to give u correct link – Ruchi S Oct 01 '14 at 09:53
  • refer this link.. u may get some idea http://www.labnol.org/internet/facebook-like-css/20755/ – Ruchi S Oct 01 '14 at 09:56
  • Nope, I need for the image faces to set width and height within html not from css. – Adrian Oct 01 '14 at 10:06