Is it possible to have a custom facebook like button? [duplicate] - facebook

This question already has answers here:
How to trigger Facebook like button from custom button?
(8 answers)
Closed 10 years ago.
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&p[title]=foo&p[summary]=bar&p[url]=https://www.foobar.com/&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

Related

Quiz result posting without permission?

I made a app on Facebook which works like a little quiz.
You just have to answer 4 questions and after it you get one of three possible results.
Now I want a button where people can PUBLISH their result, but I don't want to have one of those popups at the start of the application where people have to agree something.
I don't want to automaticly post something on user walls - just if they hit the button they get another Facebook Popup where they can decide if they wanna post the template give on their own wall ...
is it possible ? and if it is ... how ?
Yes, you can do this with the Feed Dialog. Have a look at the Direct URL Example on https://developers.facebook.com/docs/reference/dialogs/feed/ and attach the link to a button in your app.

Multiple Facebook share button/link on the same page refering different TITLE & LINK

I need to create a "contest" page where user will be asked to submit picture.
After that, they should be able to share their picture on FB, Twitter, G+, Pinterest, etc for other people to come and vote.
I want the page to be displayed as a jQuery gallery and whenever people select a thumbnail, the bigger picture open with the associated vote and "share" button.
When a user share an image, I want a specific TITLE & URL associated with that particular image... something like "http://www.mysite.com/contest.html#picture1"... or "http://www.mysite.com/contest.html#picture2"
How is this possible if I only have one page?
I wouldn't have problem if I could use the old "facebook.com/sharer.php" with parameters... but it seems that the Open Graph Protocol is "overiding" the sharer.php parameters....
Works fine with Twitter and Pinterest... I might have the same problem with Google+.
Excuse my bad english, thanks!
Well, set up a (“dummy”) page for each picture, and fill it with the appropriate OG tags … and have your users like that. And then put a JS redirect into that page, so that users following the link when it’s shared on Facebook will get to the “real” address you want them to end up at.
(Btw., IMHO this is what happens too often these days when people think doing everything client-side and client-side only is so “fancy” and that a “good” and “modern” site requires all that AJAX/one-page-only nonsense instead of a real good and working URL structure, and then are not able to handle all that this implies properly …)

Populate a sharer link for facebook

Im using this URL to share my website without having to add any facebook code:
http://www.facebook.com/sharer/sharer.php?u=http://yahoo.com
And I was wondering, is there any way to populate the description field, like another URL parameter?
EDIT: Seems like sharer its deprecated in favour of the like button, but i dont want to use the ugly look of the like button. is there a way to replace it? Im trying to achieve an effect like this in twitter:
<a href='http://twitter.com/home?status=My_message' <img src='mytwittericon.png' /></a>"
The facebook "sharer" has been deprecated and is no longer supported as it states here:
The Share button has been deprecated in favor of the Like button, and
will no longer be supported. Please use the Like button whenever
possible to drive maximum traffic to your apps.
And here:
What happened to the old Share button?
We deprecated the Share Button when we launched the Like button,
because the Like button improves clickthrough rates by allowing users
to connect with one click, and by allowing them to see which of their
friends have already connected.
I actually find Sharer more useful than Like button.
Try this code:
<img src="http://yourdefaultsharebutton.png">
Or just set proper OG tags.

Facebook Video Like using custom like button

I am developing an iPhone application that lists videos posted on logged-in user's wall. I would like to provide an Like button below each video listed. When the user clicks on this Like button, the corresponding video should be liked in Facebook.
The Like button shown in the UI should match the UI theme of my app. I have gone through Facebook plug-in documentation related to Like button. Following is the link with the documentation:
http://developers.facebook.com/docs/reference/plugins/like/
But, I cannot use this Like button generated using iFrame since I will not be able to customize the look of Like button.
How can I customize my Like button? Or how can I programmatically like a Video URL? I am trying to this since long time. I have seen some iPhone apps already having custom Like button.
Take a look here for a nice how-to on styling:
http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/
And the specific policy from Facebook is that as long as you are not deceiving the user, the policy team would consider this practice acceptable.
I could do it using Graph API. New SDK provides support for Graph API.

Create a Facebook "Like" programmatically?

I'd like to replicate the "Like" button functionality in an iPhone application using a native widget. The URL associated with the Like would be a product page with details on the manufacturer's website. Unfortunately, Facebook's Like Button [1] only supports the iframe version. Is there any way to have a user "Like" a URL without using the Like Button?
[1] http://developers.facebook.com/docs/reference/plugins/like/
There's no API to actually create a Like connection.
Looking at the Facebook Developer info, it appears it is possible to Like an Open Graph Object if it already exists in the Open Graph database. Look for the "/OBJECT_ID/likes" method under the "Publishing" section of the API Reference. It says you can "Like the given object (if it has a /likes connection)".
But I do not believe Facebook provides the ability to create NEW Open Graph objects (for, say, a webpage) programmatically. If anyone knows how to do this, I would be interested to hear about it.
There looks to be an assigned bug about not bing able to create new Graph Objects via the API: http://bugs.developers.facebook.net/show_bug.cgi?id=10714
We want to have our own "Like" system with an additional "Dislike" option, and if the user "Likes" something with our system we want to create a Facebook Like in the background. It seems we will need to pre-Like all of the objects (thousands of pages!) so this won't work for us. :(