Facebook 之类按钮的自定义皮肤

发布于 2024-09-14 16:37:26 字数 96 浏览 2 评论 0原文

有没有一种(简单)方法来自定义通过 fbml 实现的 facebook 之类按钮的外观?

我很确定我在某处看到过这个,但我不记得在哪里,也找不到任何关于此的文档。

Is there an (easy) way to customise the look of the facebook like button implemented via fbml?

I am pretty sure I saw this somewhere, but I cant remember where and I cant find any documentation on this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

绝不放开 2024-09-21 16:37:26

你不需要进行这些非法黑客攻击。只需使用“开放图”:https://developers.facebook.com/文档/opengraph/actions/builtin/likes/。缺点是您需要创建一个应用程序。

You don't need to make these illegal hacking. Just use the "Open Graph": https://developers.facebook.com/docs/opengraph/actions/builtin/likes/. The downside is you need to create an app.

残疾 2024-09-21 16:37:26

你们是律师还是程序员?问题是如何不“……做或不做……”。

@pixelistik 按钮可以通过脚本标签或 iframe 插入,当然你可以通过 JS 将 css 与 iframe 一起使用,简单易行。

@skrat 好点!

@Slavic 到底是什么服务?我称之为半服务,因为你只能喜欢 - 没有批评的余地,所以......你的批评是不恰当的。喜欢我们的帖子! :P

一般来说:如果您创建自定义按钮并且您没有签署任何条款和条件或类似的内容,您可以在您的网页上做任何您想做的事情。

Are you guys lawyers or programmers? the question was HOW not '...to do or not to do...'.

@pixelistik button can be inserted either via script tag or iframe and of course you can use css with iframe just via JS, easy peasy.

@skrat good point!

@Slavic what service exactly? I call it half-service because you can like only - no place for criticism so... your criticism is not proper. Like our posts! :P

generally: if you create custom button and you didn't sign to any t&c or something like that you can do whatever you want on YOUR webpage.

和我恋爱吧 2024-09-21 16:37:26

尽管这样做甚至可能不合法(请自行检查条款和政策),但您可以执行以下操作:

/* Like button main text color */
div.like span.connect_widget_text {color:#fff;}
div.like div.connect_widget_confirmation {color:#fff;}
div.like span.connect_widget_text a {color:#ffc6ff;}

此链接显示了一些温和的样式选项:

http://forum.developers.facebook.net/viewtopic.php?pid=236534

Although it may not even be legal to do so (check the terms and policies for yourself), you could do something like:

/* Like button main text color */
div.like span.connect_widget_text {color:#fff;}
div.like div.connect_widget_confirmation {color:#fff;}
div.like span.connect_widget_text a {color:#ffc6ff;}

This link shows some mild styling options:

http://forum.developers.facebook.net/viewtopic.php?pid=236534

梨涡少年 2024-09-21 16:37:26

简单:

只需将不透明度(ie 的过滤器)设置为 0,然后将 iframe 放在图像或带有背景图像的 div 上。对于较大的按钮,只需加载多个类似的按钮,不要加载太多,这会使您的页面速度慢得难以忍受。

Easy peasy:

Simply set the opacity (filter for ie) to 0 and put the iframes over an image or div with a bg image. For bigger buttons simply load in multiple like buttons, don't load in too many this will make your page unbearable slow.

抱猫软卧 2024-09-21 16:37:26

你好,你可以用一些智能 CSS 来做到这一点 - http:// /www.esrun.co.uk/blog/disguising-a-facebook-like-link/

Hiya, you can do it with some smart CSS - http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/

回眸一笑 2024-09-21 16:37:26

尽管此类编辑的合法性受到质疑,但我只是想分享我在这个问题上的发现。

我右键单击 Firefox 中的 FB Like 按钮,然后使用 firebug 检查该元素。类元素的读数是:

.connect_widget_like_button .liketext { 
  background: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png) -1px -33px no-repeat;
  background-image: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png);
  background-repeat-x: no-repeat;
  background-repeat-y: no-repeat;
  background-attachment: initial;
  background-position-x: -1px;
  background-position-y: -33px;
  background-origin: initial;
  background-clip: initial;
  background-color: initial;
}

这存在于 like.php 的第 172 行

我知道确实使用自定义图形的一家公司是 Disqus,但是他们的按钮是一个多功能元素,可以让您在 facebook 和 facebook 之间进行选择。 twitter onClick,这可能是他们能够根据自己的需求定制它的方式。

Although the legality of such edits is under question, I just wanted to share my findings on this subject.

I right clicked on a FB Like button in Firefox, and inspected the element with firebug. The readout of the class elements is:

.connect_widget_like_button .liketext { 
  background: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png) -1px -33px no-repeat;
  background-image: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png);
  background-repeat-x: no-repeat;
  background-repeat-y: no-repeat;
  background-attachment: initial;
  background-position-x: -1px;
  background-position-y: -33px;
  background-origin: initial;
  background-clip: initial;
  background-color: initial;
}

This exists on line 172 of like.php

One company I know of that does use a custom like graphic is Disqus, however their button is a multi-functional element that offers you a choice between facebook & twitter onClick, which may be how they were able to customize it to their needs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文