如何在 facebook 按钮中隐藏 connect_widget_user_action 类?
我的网站主页上有一个类似 facebook 的按钮。 其代码是:
<div><iframe id="ifFacebook" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.MYSITE.com%2F&layout=standard&show_faces=false&width=450&action=like&colorscheme=light&height=80;" scrolling="no" frameborder="0" style="margin-top:0px; overflow:hidden; width:250px; height:80px;" allowTransparency="true"></iframe></div>
如果我没有登录 Facebook,那么我可以选择单击 Like 按钮。我点击按钮,我得到 Facebook 弹出窗口用于登录,我登录,然后几秒钟我可以看到有关我的操作的文本,该文本淡出并替换为“你和 x 其他人这样。添加评论”
我想要始终隐藏有关我的操作的文本,并且不要让它可见,即使是几秒钟。我看到它位于 facebook iframe 的 connect_widget_user_action 类中。
有谁知道我怎样才能禁用它?
谢谢
I have a facebook like button in my web site in the home page.
The code for it is:
<div><iframe id="ifFacebook" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.MYSITE.com%2F&layout=standard&show_faces=false&width=450&action=like&colorscheme=light&height=80;" scrolling="no" frameborder="0" style="margin-top:0px; overflow:hidden; width:250px; height:80px;" allowTransparency="true"></iframe></div>
If I am not logged in Facebook, then I have the option to click the Like button. I click the button, I get the facebook pop up window for login, I login and then for some seconds I can see a text regarding my actions, which is fade out and replaced by "You and x others like this. Add Comment"
I want to always hide the text about my actions, and don't make it visible even for seconds. I see that is is in the connect_widget_user_action class in facebook iframe.
Does anyone know how can I disable this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能。出于安全原因,无法从父文档访问 iframe 中加载的内容。根据浏览器的不同,如果两个文档均来自同一域,则可能允许访问,但此处情况并非如此。
您可以尝试使用较旧的社交插件,例如 Fan Box,它允许指定 CSS 文件并对其进行修剪。我不知道那些是否仍然有效。他们可能随时停止这样做。
You can't. Content loaded in an iframe is not accessible from the parent document for security reasons. Depending on the browser, it might allow access if both documents are served from the same domain, but that's not the case here.
You could try using an older social plugin like the fan box which allowed to specify a CSS file and trim that down. I don't know if those still work. They might stop doing so at any time.