Jump to content

how to insert a facebook like button after login/logout


Recommended Posts

Hi,

 

I would like to add a facebook like button just after the login/logout link.

 

which are the files to edit for inserting the facebook like button code?

 

The fb code is attached herewith.

 

Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.
<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_GB/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Place the code for your plugin wherever you want the plugin to appear on your page.
<div class="fb-like" data-href="https://www.facebook.com/SwissTimeHouse" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
 
thanks in advance.
 
Cushbinshadpost-745465-0-00829800-1405576270_thumb.png
Link to comment
Share on other sites

i see that you use some non default theme

i don't know structure of this template but you can deal with absolute position of block

 

insert your facebook block to other div:

 

<div class="facebookButton">CODE HERE</div>

 

then you will be able to stylize it with css styles

.facebookButton{
position:absolute;
right:20px;
top:100px;
}
Link to comment
Share on other sites

Hi,

 

using iframe the problem is solved..

 

 

<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fswisstimehouse&width&layout=button&action=like&show_faces=true&share=true&height=80&appId=248603172003426" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:80px;" allowTransparency="true"></iframe>

 

 

Thank you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...