有可能有自定义的Facebook喜欢按钮吗? [英] Is it possible to have a custom facebook like button?

查看:127
本文介绍了有可能有自定义的Facebook喜欢按钮吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时,客户想要自定义facebook按钮。我的意思是用不同的形象和设计。



我曾经和sharer.php合作:

 < a id =fb-sharestyle ='text-decoration:none;'type =icon_linkonClick =window.open('http://www.facebook.com/ sharer.php S = 100&放大器;放大器; p [标题] = FOO&放大器;放大器; p [摘要] =栏&放大器;放大器; p [URL] = HTTPS:?//www.foobar.com/&安培; p [图像] [0] = HTTPS://www.foobar.com/thumb.gif','sharer','toolbar=0,status=0,width=580,height=325' ); href =javascript:void(0)> 
< img src =img / share.gifwidth =62height =18alt =Share/>
S< / a>

但是,由于Facebook已经弃用了Share按钮,所以看起来不太好。相反,我们必须使用喜欢按钮。



那么可以有一个自定义的按钮与自定义图像?



我在facebook api页面上看到一个生成器来创建按钮,但是我想知道是否可以使用不同图像的自定义按钮?

解决方案

很多工作。



基本上,你必须发布喜欢通过Open Graph API进行操作。然后,您可以将自定义设计添加到您喜欢的按钮。



但是,您需要跟踪自己的喜好,以便返回的用户能够不同于以前喜欢的内容。



另外,您需要请求用户登录到您的应用程序,并向他们询问 publish_action 权限。


$ b $总而言之,如果您正在为应用程序执行此操作,可能值得。对于您基本上希望用户喜欢文章的网站,这真的很多。



此外,考虑到您每次询问用户时都会提高您的下班率通过Facebook登录获得许可。



如果你想看一个例子,我有一个最近使用打开的图形,如按钮制作了一个应用程序,只需悬停在mosaique中的一些照片上即可查看


Sometimes, clients want to have a custom "facebook button". I mean with a different image and design.

I used to work with sharer.php :

<a id="fb-share" style='text-decoration:none;' type="icon_link" onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=foo&amp;p[summary]=bar&amp;p[url]=https://www.foobar.com/&amp;p[images][0]=https://www.foobar.com/thumb.gif','sharer','toolbar=0,status=0,width=580,height=325');" href="javascript: void(0)">
<img src="img/share.gif" width="62" height="18" alt="Share"/>
S</a>

But it seems it doesn't work very well since facebook has deprecated the Share button. Instead, we have to use the "like button".

So is it possible to have a custom like button with a custom image ?

I've seen on the facebook api page a generator to create the button but i would like to know if it is possible to have a custom button with a different image ?

解决方案

It's possible with a lot of work.

Basically, you have to post likes action via the Open Graph API. Then, you can add a custom design to your like button.

But then, you''ll need to keep track yourself of the likes so a returning user will be able to unlike content he liked previously.

Plus, you'll need to ask user to log into your app and ask them the publish_action permission.

All in all, if you're doing this for an application, it may worth it. For a website where you basically want user to like articles, then this is really to much.

Also, consider that you increase your drop-off rate each time you ask user a permission via a Facebook login.

If you want to see an example, I've recently made an app using the open graph like button, just hover on some photos in the mosaique to see it

这篇关于有可能有自定义的Facebook喜欢按钮吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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