Put Facebook like XFBML button in line with Pinterest button - facebook

I know similar questions have been aske before but I'm new at this and can't make sense of it. I'm fairly sure its a straightforward task but I can't do it.
I'm using a CMS on which I cannot access the css template currently.
All I want is to add a Pinterest button and facebook like button to my individual product pages using the html source code editor in a nice neat row. At the moment they display one below the other.
These are the codes:
<a data-pin-config="above" href="//pinterest.com/pin/create/button/" data-pin-do="buttonBookmark">
<img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" />
</a>
<fb:like send="true" layout="button_count" width="100" show_faces="false"></fb:like>
How to write the correct styling code to achieve this?

Related

Facebook buttons not expanding container div

I am having a problem getting a div containing facebook like/send buttons to expand when the buttons are clicked. I have searched and tried and tried to fix this, but I'm hitting a wall. I believe it has something to do with how the buttons render an iframe, but I'm not sure.
Here's the code, plain and simple (with an example link for og data).
<div id="fb_btns">
<fb:like href="http://www.imdb.com/title/tt0117500/" data-send="true" layout="button_count" width="450" show_faces="false" ></fb:like>
</div>
and the non-expanding div can be seen here
http://spadeballink.com/GALLOWS/TheGoddamnGallows.html
Any help counts! Thanks in advance!
*Also there is no css declaring the height of this div, the only heights declared are for html and body to be 100% (needed for the background image).
Are you using XFBML or Iframe version of like button? For Iframe version you need to use layout=standard for people to be able to see fly-out comment box.

Show/hide Iframe

I am using wordpress for my website and I am trying to set up my pages so that a user has to click a button to view the content. Yes, very simple with show/hide etc but the button I Want the user to click is this http://www.facebook.com/plugins/like.php
To display that in my page i need to use an iframe which is where it gets tricky. I have set up the show/hide code so that when a user clicks the like button (or anywhere in the iframe) it will display the content. But, no such luck!
This is my code
<div id="imagebox" style="display:none;"><?php $image = wp_get_attachment_image_src(get_field('image'), 'full'); ?>
<img src="<?php echo $image[0]; ?>" alt="<?php get_the_title(get_field('image')) ?>" /> </div>
<div onclick="ShowDiv()"><iframe src="http://www.facebook.com/plugins/like.php? href=http://www.facebook.com/BrandBang&" allowTransparency="true">
</iframe></div>
<script language="javascript">
function ShowDiv()
{
document.getElementById("imagebox").style.display = '';
}
</script>
I know that it is hard to use iframes to do what I am trying to do, but i am a total newbie when it comes to this stuff. Any help would be great!
Have tried giving your div an id="imagebox"?
EDIT:
This was already answered here.
But, I didn't realize at first sight that you're loading something in the iframe that is not coming from your own domain, so you're going to fall in a cross site scripting event, which is not allowed.
Afaik, you have to redesign some way your implementation.
For instance, you could retrieve the generated html from facebook using curl and then outputting in your own div. Something like that should work.

Trying to right justify "Like Us On Facebook Code" in Header

So I am trying to add the following "Like Us On Facebook" code in the header of my website and have it be right justified, while the Title & Description remain left justified. Here is the FB code:
<div class="fb-like-box" data-href="http://www.facebook.com/HowToForiPad" data-width="292" data-show-faces="false" data-stream="false" data-header="false"></div>
I'm not the most knowledgeable about this type of thing so I'd prefer not to mess with the CSS and have been just trying to drop the code above into the appropriate place in my header.php file. The tricky part (for me) is making the Facebook Like right aligned while the site title and description remain left aligned.
Here is an example of what I want it to look like (ignore the underscores...had to do it to make it look right)
WELCOME TO WHATEVER SITE
The site does blah blah________________________________________Like us on facebook
Here is the relevant code from the header.php:
<!-- HEADER -->
<div id="header">
<div class="website-name"><?php bloginfo('name'); ?></div>
<div class="slogan"><?php bloginfo('description'); ?></div>
</div>
<!-- /HEADER -->
So basically I'd like the Facebook code to be in line with the site description but right justified (whereas the site description is left justified).
Greatly appreciate any help!
Using CSS is pretty much your only option.
You can change the slogan div to a span (or set a width on the div), add the fb like box below this span and float it right. That should do what you need.
If you REALLY don't want to touch your CSS file, you can add the styles inline, but I don't recommend this as it is not best practice.

Facebook Like Box Header missing if faces=false and stream=false

I've inserted a like box into my page but I have a problem with it.
<fb:like-box href="http://www.facebook.com/TermeszetBolond.Hu" width="176" show_faces="false" border_color="#befcbe" stream="false" header="true" height="140"></fb:like-box>
The like box is loaded, but the facebook header is missing.
You can see the result of this code on the left-middle of http://termeszetbolond.hu
Please heeelp... :)
try: by default show faces is false so need to declare it, same with stream.
<fb:like-box href="http://www.facebook.com/TermeszetBolond.Hu" width="176" header="true" height="140"></fb:like-box>

Facebook Like button for fan page - cannot create simple button

is it possible to create simple Like button for fan page? When I create official Like button, insert my fan page URL in form, it always generate button with image and page title as it is Like box not Like button. I just want simple Like button only with "Like" label and users count.
Is this an issue or default behavior, or just my misunderstanding?
Thanks for advice
Tomas Teicher
Did you mean you want this button?
http://developers.facebook.com/docs/reference/plugins/like
Alternatively, you may use AddThis widget - They even provide analytics for you.
http://www.addthis.com/
I use the widget on this website: http://muamalat.com.my/consumer-banking/financing/mortgage/
I must have misread your question. In that case I've only come across this: http://developers.facebook.com/docs/reference/plugins/like-box/
Uncheck show faces, stream and header; that's the cleanest you could get. Is this what you're looking for?
I don't think AddThis has that feature you speak of. :)
One way to only show the like button by itself is to hide the top part of the button by setting the iframe dimensions to the size of the button: 60x20.
<iframe src="http://www.facebook.com/plugins/like.php?&href=&send=false&layout=button_count&width=60&height=20&show_faces=false&action=like&colosheme=light"
allowtransparency="true" frameborder="0" scrolling="no"
style="width: 60px; height: 20px;">
</iframe>
If you are using Iframe you need to place an http or https: because >iframe starts as
<iframe src="//www.facebook.com/plugins/likebox.php?href= ................></iframe>
and you need to place
<iframe src="**http:**//www.facebook.com/plugins/likebox.php?href= ................></iframe>
The above answer did help me in finding that out.
If i read this correct, then it is definitely possible:
https://developers.facebook.com/docs/reference/plugins/like/
Put in your Page URL, for example: https://www.facebook.com/bladauhu
(that is my own page)
Uncheck Send Button, use Layout Style "button_count", uncheck Show Faces. Leave the rest as it is and click on the "Get code" button. Use the HTML5 or XFBML Version.
For me, this works just like every other Website and it shows the correct number of likes from the Facebook Page. No additional Images, just the plain and simple Like button.
Adding data-layout='button_count' to the HTML5 version worked for me:
<div class="fb-like" data-href="http://facebook.com/wewantoo" data-send="false" data-width="90" data-show-faces="false" data-layout='button_count'></div>