Вопрос

I've been checking into some issues with Facebook Like Box plugins on websites my company manages, and have seen different behavior in the past two days. Can anyone help to explain if this is more likely an issue with Facebook, or the target profile/page settings?

I'll focus on the more obvious one here.
When the 'Show Faces' option is disabled and no Data-height is explicitly specified for the plugin, the area to display the Stream activities is reduced to 0 and all that is displayed is a double horizontal line.

Working from the Developers.facebook demo page (https://developers.facebook.com/docs/reference/plugins/like-box/) 1) Enter a valid facebook Page for the address -- Defaults should display with width=292, height blank, and all other options checked. 2) un-check 'Show Faces' -- Like Box shrinks to only display Header, and the Social Plugin footer. 3) Enter a Height value ( anything above 150 px should display some area of content and the vertical slider again, but with the Like Box total height restricted to the height entered)

(I wanted to post this to Facebook as a Bug report, but could not find the correct steps to do so.)

Это было полезно?

Решение

Facebook must have changed something. This only seems to be affecting the HTML5 implementation of this plugin. Some other sites which I maintain, which use the iframe implementation, do not seem to be affected.

I just added a fixed 'data-height' attribute to the 'fb-like'box' div of the HTML5 implementation of the plugin - seems to have done the job.

Другие советы

Looks like they have changed (or broke) the default value for height from "300px" (I think that is what it was) and replaced it with the 120px which leaves no room for the stream. If you add faces it ups the default value and leaves room for the stream.

If you change the height of the box to say 600px (depends on what you want) then even with faces off it will show the stream.

For example if you goto: https://developers.facebook.com/docs/reference/plugins/like-box/

Then turn stream on and faces off (even on the default site of FB Dev) it will still hide the stream with no height specified. Then change the height to say 600px the stream will appear.

Feels like less of a bodge than the other method that Nathan mentioned (which I couldn't get to work anyway! :( LOL)

Hope this helps someone else. :)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top