specify the language and no. of connections in facebook "like" box

4.7k views Asked by At

I add the facebook like box to my website with the following code

(generated from http://developers.facebook.com/docs/reference/plugins/like-box/)

<script src="http://connect.facebook.net/zh_HK/all.js#xfbml=1"></script>
<fb:like-box href="my-fb-page" width="185" show_faces="true" stream="false" header="false"></fb:like-box>

This like box will show more than 20 profile pictures while I just want to limit it to certain number (say only 6 pictures)

I know that there is a connections attribute to do this if I use the iframe version of code, but with iframe code I can't specify the language interface other than en_US.

I want to have zh_HK language interface and limit the num. of pictures to only 6.

I don't buy the solution that hiding the extra pictures with the height as the browser will keep download all pictures even though they're hidden. What I want is only download and show the pictures that I really need.

Any idea? Thx!

2

There are 2 answers

1
Horst Gutmann On

You actually can specify the language in the iframe version by passing it as long-form ISO-code in the "locale" parameter:

http://www.facebook.com/plugins/likebox.php?locale=de_DE&...

This one is undocumented and probably a remnant of the old fb:fan plugin.

Regarding setting connections: From what I can tell this option has been completely removed from the like-box plugin. Right now I can't even get it work reliably in the iframe version.

0
product17 On

The attribute you want to use is: connections="6"

You need to put it somewhere in your fb:like-box

<fb:like-box href="my-fb-page" width="185" show_faces="true" connections="6" stream="false" header="false"></fb:like-box>

if you're not using the xfbml version you will need to use a data-attr, so: data-connections="6"

I found this on: http://line25.com/tutorials/how-to-add-a-custom-facebook-like-box-to-your-site