4

Possible Duplicate:
Facebook Like Button - how to disable Comment pop up?

I have a Facebook Like button on my site like so:

<fb:like href="http://www.facebook.com/myurl" colorscheme="light" send="false" width="450" show_faces="false" font="" ref="top_like_button"></fb:like>

When the user clicks it, I need to refresh the page. I have seen various posts on how to do this using the 'edge.create' event, and it works fine.

But my problem is when they click Like, it shows a popup saying "Post to Facebook".

facebook like popup

So I really need to refresh my page after they have closed the popup. Is this possible?

An alternative acceptable solution would be to disable the popup completely, so that when they click Like the popup doesn't appear.

Thanks

Community
  • 1
  • 1
Matt Frear
  • 52,283
  • 12
  • 78
  • 86

2 Answers2

7

You can avoid this flyout being displayed by using iframe version of Like Button social plugin.

When will users have the option to add a comment to the like?
If you are using the XFBML version of the Like button, users will always have the option to add a comment. If you are using the Iframe version of the button, users will have the option to comments if you are using the 'standard' layout with a width of at least 400 pixels. If users do add a comment, the story published back to Facebook is given more prominence.

Beware, this will make impossible to subscribe to edge.create/egde.remove events.

Juicy Scripter
  • 25,778
  • 6
  • 72
  • 93
  • Thanks for that, but no go either. If I use the iframe version then "Beware, this will make impossible to subscribe to edge.create/egde.remove events." so I won't know that they've clicked Like so I won't be able to refresh the page. – Matt Frear Mar 22 '12 at 15:33
  • @MattFrear, well, you can try a `CSS` solution provided in answer to the question I've referred in a comments to your submission, which may or may not work (it's a bit old) for you. I'm personally can't recommend such a solution because of alternating behavior expected by user and for sure without consulting a lawyer (due to possible policy issues). – Juicy Scripter Mar 22 '12 at 15:43
  • this do helped me. Thanks a lot – Cullen SUN May 28 '13 at 10:18
4

Iframe it or simply have the like box in a tight div with overflow: hidden.

div#like_box {
    height: 20px;
    overflow: hidden;
    padding: 0;
}

If you can't remove it; hide it! :)

Robin Castlin
  • 10,956
  • 1
  • 28
  • 44
  • 1
    This probably will be violation of [platform policies](https://developers.facebook.com/policy/): *IV.4.d "You must not obscure or cover elements of our social plugins, such as the Like button or Like box plugin."* – Juicy Scripter Mar 22 '12 at 15:24
  • Hmm, nice try. It doesn't work for me - the Like button disappears and the flyout comment box still appears but in a 20px high window, so you can only see the "Add a comment" textarea and you can't see the flyout's buttons. – Matt Frear Mar 22 '12 at 15:25