I have a facebook 'Like' button on my page and it's working fine. But when the visitor is logged in as a 'Page' at facebook it includes a photo and breaks my design. I guess this is because Pages aren't allowed to like things.
I pretty much have an iframe like this: http://developers.facebook.com/docs/reference/plugins/like-box/
Any ideas of how I get rid of this image? Any way to alter the design, disable this "feature" or check if the user is logged in as a page (to hide the whole thing)?
Thanks
Edit: Screenshot of the issue: i.imgur.com/gLa7Q.png In the top one I'm logged in as a regular user and the bottom I'm "Using facebook as Page"
The code I'm using: <iframe class="facebook" src="http://www.facebook.com/plugins/like.php?href=<?=urlencode('http://www.mysite.com')?>&layout=standard&show_faces=false&width=210&action=like&colorscheme=light&height=45" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
You can use the 'overflow' element in your css to stop it breaking the design. This at least keeps the like box the same size whatever somebody is logged in to Facebook as.
1) Wrap your like box in a div and give it an id (in the HTML)
<div id="mylikebox"> Facebook like Box Code in here </div>
2) Add to CSS (adjust height and width if you need to)
#mylikebox {
height: 70px;
width: 210px;
overflow: hidden;
}
Let Me Know if it works out!
I just noticed the exact same issue. Seems a bug on FB's part, as they provide an insertion code for their like button that breaks under a particular but perfectly normal condition (i.e. signed in to FB as a page.) I would love a solution too. In the meantime the bug has prompted me to remove the FB like button altogether from my blog, which unfortunately seems to be the only solution at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With