Facebook Like-Button - hide count?

后端 未结 15 753
我寻月下人不归
我寻月下人不归 2020-11-29 18:17

In the setup dialog for the Like-Button, there are only two options for layout:

  • Alternative 1
  • Alternative 2

Unfortunately, the numbers

15条回答
  •  一生所求
    2020-11-29 18:32

    If you're using Facebook's javascript like button (so you can capture like events), here's what we had to do:

    Due to a change Facebook recently made in the way comment dialogs display, we had to change how we were hiding it. The way they show the comment dialog has been 'moving' the content inside of the my overflow:hidden element so that the button looks really odd to the user after they click the like button.

    In addition to adding a wrapping element with an 'overflow:none' style, you will need to hide the comment element that Facebook is putting onto your page:

    Styles:

    span.no_overflow {
      overflow: none;
      width: 50px;
    }
    
    .no_overflow span.fb_edge_comment_widget.fb_iframe_widget {
      display: none;
    }
    

    Markup:

    
    
    
    

    We're still using the fb:like markup though. I have not tested this with the new div-based markup that Facebook is providing on their site now.

提交回复
热议问题