Facebook like - Post ID 276203

User 458539 Photo


Registered User
1,647 posts

Anybody know how to do a link that auto goes into facebook and like the page?

Like this

http://www.proguardstorage.com/Review

at the bottom

Thanks

Byron
User 53435 Photo


Registered User
79 posts

It is simply a matter of putting the appropriate html code in at the desired place on the page.
I have used it on the robtechrecords.com page (also at the bottom).
FB will give you the appropriate code to add to the page, look on their developer site.

For this site it was this code, inserted into an html element on the page.
<div class="fb-like" data-href="https://www.robtechrecords.com/" data-width="120" data-layout="button" data-action="like" data-size="small" data-show-faces="false" data-share="true"></div>
User 458539 Photo


Registered User
1,647 posts

Thanks Geoff - will check it out

Byron
User 53435 Photo


Registered User
79 posts

I should have also added that there is some javascript that needs to be inserted at the top of the page too.
I add this into an html element at the very top of the page.

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.9";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

User 458539 Photo


Registered User
1,647 posts

In the head section?

Byron
User 53435 Photo


Registered User
79 posts

At the top of the <body> section. Just add an html element at the top of your page.
User 458539 Photo


Registered User
1,647 posts

Geoff

I can't find this info on FB -where did you find it. Looked in the forum and I must be using the wrong search terms as I can't find it

Byron
User 187934 Photo


Senior Advisor
20,271 posts

Byron Tipping wrote:
Geoff

I can't find this info on FB -where did you find it. Looked in the forum and I must be using the wrong search terms as I can't find it

Byron

https://developers.facebook.com/docs/pl … ke-button/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 458539 Photo


Registered User
1,647 posts

THANKS ERIC!!!!!!!!!!
User 2756496 Photo


Registered User
44 posts


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.