Jak používat XFBML.ProfilePic

hlasů
0

Snažím se zobrazí obrázek profilu uživatele Facebooku pomocí XFBML. Já používám následující kód:

var container = document.getElementById(profilePicture);
var profilePic = new FB.XFBML.ProfilePic(container);
//profilePic.setAttribute(uid, userId);
FB.XFBML.Host.addElement(profilePic);

Jak mohu nastavit uid atribut prvku? (Dále uvedl linka nefunguje)

Položena 16/02/2009 v 21:41
zdroj uživatelem
V jiných jazycích...                            


1 odpovědí

hlasů
3

Nastavit atribut před jeho odesláním do ProfilePic pro zpracování:

var container = document.getElementById("profilePicture");
container.setAttribute("uid", userId);
var profilePic = new FB.XFBML.ProfilePic(container);
FB.XFBML.Host.addElement(profilePic);
Odpovězeno 26/02/2009 v 23:58
zdroj uživatelem

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more