Link the like button of my site to the FB like button - javascript

I've been trying to make my own social buttons. Everything worked fine for the sharing buttons. However, I can't have a good result with the FB like button. I created a SVG image with the thumbs up and I open a javascript popup window that shows the FB like button. It's not friendly user at all as the person has to click twice to like the content.
I'm trying to figure out a way to make my button likes directly on FB. Do you know if it is possible? I have seen sites that have their own like button like a "heart" button or something like that and once we click it makes also a like on facebook besides the site's like. Does anyone knows how to do it?
For the moment, the code is this one with the SVG image between the tags:
Thanks.

Related

Grabbing images from a page for Pinterest pinit button

I am using Pinterest share button for my website. The expected behavior i want is whenever i press pin it button it shall show me all iamges on the page and give me an option to pin one from them.
Just like pin it button on http://www.dogster.com/the-scoop/minkyu-lee-adam-and-dog-nominated-for-an-oscar
However, pin it api present at http://pinterest.com/about/goodies/ needs a hardcode media url for pinning.
I am not sure how to grab this behavior from Pinterest, can anyone help me with this ?
Found it:
http://business.pinterest.com/widget-builder/#do_pin_it_button
It does give me the desired behavior. It was totally hidden from dev stuff at Pinterest

Dynamically add Like Buttons to a page

I'm building a page that is aggregating other pages in a Wordpress site, and displaying snippets of information about them along with a 'Like' button. Right now I'm using the iFrame option.
What happens is when a user clicks on a video, it displays it in a Feature area with the video, some text, and a Like button. This HTML is generated from a template and created after a user clicks on a video to watch it. There isn't a page refresh.
If I use the HTML5 version of the Like button, it never gets rendered, which I'm guessing is because the Like div never exists when the Facebook init is called. I'd like to not use the iFrame version though, because it doesn't seem to let me allow people to comment on their like.
Is there a way to have Facebook re-scan for elements to render? I know that Twitter will allow you to do this by running twttr.widgets.load() at any time to have it rescan for things to render.
Just call this function after loading the dynamic site, i am pretty sure it´s what you need:
https://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/

How to know the Id of the facebook like button

I am creating a website that users are supposed to download a video after they like the video using the Facebook like button.That is if someone likes the post on Facebook, instead of them showing the inactive "you like this" button, it shows a download link with the video URL. I have implemented the like button but for the download button not yet. Anyone with an Idea of how I can accomplish this?
Just wrap like button in div element with given id, then you will be able always get like button.

Facebook like button for item not a link

I can create a Facebook like button easily enough to like a URL but what I can't do is get it to like an item in a Facebook page.
So for example in this link (https://www.facebook.com/photo.php?fbid=347060885316097&set=t.540015414) is a picture and you can like it. But if I was to place that URL inside a LIKE button and click that I'm liking the page and not the item.
So any ideas on how to create a button to like an item rather than the link?
See the Facebook API:
https://developers.facebook.com/docs/reference/plugins/like/
Using their generated code will show you what is really required. They show you a link to an iFrame with parameters that you can use for the actual item being liked (the web page or the Url to the picture in each of those cases).
GL.

Can't create facebook like button for a facebook page, says could not reach

I'm trying to create like button on https://developers.facebook.com/docs/reference/plugins/like/ with the url of facebook page which is http://www.facebook.com/captainmorganlietuva but it doesnt work - says ERROR when i push LIKE. Any ideas?
Error says PAGE COULD NOT BE REACHED. Do I have to be admin of that page to create like button or something?
I'm really not sure that this is the problem, or if I totally understand the problem but something jumped out at me - Why are you trying to create a like button for a Facebook Page that already has a like button on it? If you are trying to connect that page's like button to a like button on a different URL then this is against facebook platform policy. If you were able to do this people would be able to "trick" users into liking a URL they didn't mean to "like".

Categories