How can I make the Facebook Like button's width automatically resize?

后端 未结 8 1114
清酒与你
清酒与你 2020-12-13 13:53

I\'m implementing the Facebook Like Button, but I\'m running into some trouble with the width. I\'m using the JavaScript SDK implementation, not the direct iframe.

A

8条回答
  •  甜味超标
    2020-12-13 14:43

    There are some FAQ answers that are worth reading when choosing a size.

    https://developers.facebook.com/docs/plugins/like-button

    Although with that said it's still pretty cryptic :

    "The width of the plugin. The layout you choose affects the minimum and default widths you can use, please see the FAQ below for more details."

    standard

    Minimum width: 225 pixels.

    Minimum increases by 40px if action is 'recommend' by and increases by 60px if send is 'true'.

    Default width: 450 pixels. Height: 35 pixels (without photos) or 80 pixels (with photos).

    box_count

    Minimum width: 55 pixels. Default width: 55 pixels. Height: 65 pixels.

    button_count

    Minimum width: 90 pixels. Default width: 90 pixels. Height: 20 pixels.

    button

    Minimum width: 47 pixels. Default width: 47 pixels. Height: 20 pixels.

提交回复
热议问题