Hoe te XFBML.ProfilePic gebruiken

stemmen
0

Ik probeer van een Facebook-gebruiker profiel foto met XFBML weer te geven. Ik gebruik de volgende code:

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

Hoe stel ik de uid attribuut van het element? (Het commentaar lijn werkt niet)

De vraag is gesteld op 16/02/2009 om 21:41
bron van user
In andere talen...                            


1 antwoorden

stemmen
3

Stel het attribuut voordat deze naar profielfoto voor verwerking:

var container = document.getElementById("profilePicture");
container.setAttribute("uid", userId);
var profilePic = new FB.XFBML.ProfilePic(container);
FB.XFBML.Host.addElement(profilePic);
antwoordde op 26/02/2009 om 23:58
bron van user

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