A few questions regarding the Facebook like button on external websites - facebook

I am working on a project where I need to manipulate the button in a few ways.
Is it possible to just have the button and not the 'X people like this' text after it?
Does it have to be for one's own page or can it be easily configured, e.g. can I have a button that when clicked likes the fan page for Coca-Cola?
If so, is it possible to get the pop up when you hover over the button, like the pages down the left hand side on https://www.facebook.com/Google
Thanks very much in advance for your help. Please let me know if I have been unclear.

You could try the button_layout layout, which just has the little speech bubble with the number of likers. If you don't like that, you can cut that bubble off by setting the width of the parent container to less than the width of the button.
You can use whatever page URL or web page URL you want.
Hovercards aren't available on fb:like right now, but might be at some point.
More documentation here.

Related

facebook share dialog gets cropped

The problem is that my like button is quite at the bottom at the page,
And when someone clicks the like button, the dialog just gets cropped,
and I just can't do anything with it.
Did anyone have a similar problem?
The only way to fix this is by using some CSS to your page to move the dialog box. This is kind of a hack, but its the only way to really do what you want. The only downside is that the tiny triangle in the top left corner of the dialog will seem out of place.
One other option that does not involve moving the dialog is to make your page slightly longer.

Facebook like button: hide text

I just added a Facebook like button to my website, just the most basic one, but you can't select to hide the "Sign Up to see what your friends like." text.
Because the area for the button is so small, I don't want this text, as it overlaps with other text next to it.
Is there a way to hide this part?
I basically just want the like button, with the same functionality.
You would have probably figured it out by now but for others who haven't and reach this question, try data-layout="button_count".
You can play around here for more options: https://developers.facebook.com/docs/reference/plugins/like/
You can add layout="simple" (XFBML), or "data-layout"="simple" for HTML5 to the tag.
That'll show just a like button, with no count, faces or nonsense :)

How to achieve slideToggle effect similar to facebook "New Stories" button with jQuery?

As you may know not long time ago facebook added several new features. One of them was a "New Stories" button which when clicked expands (with what I guess is a slideToggle effect) and shows new stories.
Here is the button I am talking about:
I would like to know How to achieve same slide / toggle effect and fade in effect that comes in after this button is clicked, with a help of jQuery.
I tried searching for this on internet, but all effects I found were regular slideToggle effects, I mean they started showing div from top and slided down to it's bottom (here is what I mean by regular content http://jsfiddle.net/TwxB4/), where as one facebook uses starts from the bottom of the hidden div and sort of slides to the top of it. (You will see what I mean if you check it on facebook).
Edit: I am only looking for a slideToggle effect and nothing else, I want to be abble to expand and shrink hidden div when user clicks on the link that lunches the effect.
Edit: Here is an illustration of the effect I'm looking for:
This example works the way you described, showing bottom content first:
http://jsfiddle.net/SBLNn/16/
Also full screen view here:
http://jsfiddle.net/SBLNn/16/embedded/result/
They may also do it by having the overflow of the feed hidden, and then setting a negative margin on the inner feed wrapper, then when you click they just animate that negative margin down to 0.
Does this works for you
http://jsfiddle.net/wb7h6/1/
updated version
http://jsfiddle.net/wb7h6/9/ I hope this is what you need
You want slideToggle() I think. See this jsFiddle.

Facebook "like" dialog box (XFBML) overflows normal page boundary, how to flip it?

The dialog that pops up after a user clicks "like" on my (in development) website overflows the main content area of my website:
Is there any way to flip it around so that it pops up to the left of the like button instead of to the right?
Thanks in advance.
No, this is not possible. Even if there are hacks for this, it won't be legal.
You just need to keep it the way it is, or change its place.

Showing different content in Facebook iframe WITHOUT using "Like"

OK, this is not the question you might think. We need to set up a tab on a Facebook page & of course that now means iframes, not FBML.
The initial content displayed will be a graphic containing a question. The answer, in the shape of another graphic, is to be revealed by clicking on the first image. The initial image must be replaced by the second (which shows the answer).
"Like" does not enter in to this: the function is the same whether the user "likes" the page or not. It's just "click this image to display the answer".
As iframe newbs, this is causing us a bit of a headache - so can anyone help ?
Thanks.
The iframes in Facebook now function just like a normal web page. Just capture the click event on the initial image using javascript (and/or jQuery) and display replace it with the new imagery.