Facebook像按钮“打破”当登录为页面 [英] Facebook like button "breaks" when logged in as page

查看:113
本文介绍了Facebook像按钮“打破”当登录为页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面上有一个Facebook'Like'按钮,它的工作正常。但是当访问者在Facebook上登录为Page时,它包含一张照片,并打破了我的设计。我想这是因为页面不允许喜欢的东西。



我几乎有一个这样的iframe: http://developers.facebook.com/docs/reference/plugins/like-box/


$ b $任何想法如何摆脱这个形象?任何改变设计的方法,禁用此功能或检查用户是否以页面方式登录(以隐藏整个事物)?



谢谢



编辑:
问题的屏幕截图:i.imgur.com/gLa7Q.png
在顶端我以普通用户身份登录,底部是使用Facebook页面



我使用的代码:< iframe类=facebooksrc =http://www.facebook.com/plugins/like.php?href=<?=urlencode('http://www.mysite.com')?>&amp; layout = standard& amp; amp; amp; amp; amp; amp = amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; ;< / iframe>

解决方案

您可以使用您的css中的overflow元素停止打破设计。这至少保持相同的大小,无论有人登录到Facebook。



1)将你喜欢的框包装在div中,并给它一个id(在HTML中)

 < div id =mylikebox> Facebook的Box Code在这里< / div> 

2)添加到CSS(如果需要,调整高度和宽度)

  #mylikebox {
height:70px;
width:210px;

overflow:hidden;
}

让我知道它是否奏效!


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')?>&amp;layout=standard&amp;show_faces=false&amp;width=210&amp;action=like&amp;colorscheme=light&amp;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!

这篇关于Facebook像按钮“打破”当登录为页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆