Open sarahmonks opened 7 years ago
+1
+1
sorry im english beginner :( but i write this code i share you...
var fbLoginSuccess = function (userData) {
facebookConnectPlugin.api("me/?fields=first_name,gender", ["public_profile"],
function (result) {
cinsiyet = result['gender'];
localStorage.setItem("cinsiyet", cinsiyet);
isim = result['first_name'];
localStorage.setItem("isim", isim);
},
function (error) {
alert("Failed: " + error);
});
faceid = JSON.stringify(userData['authResponse']['userID']);
baslat();
}
facebookConnectPlugin.login(["public_profile"],
fbLoginSuccess,
function (error) {
if (interval != null) { clearInterval(interval); } var interval = setInterval(facekontrol(), 5000); document.getElementById("ortaAlan").innerHTML = "<img src ='images/facebookloginerror.png' name='facekontrol' onclick='facekontrol()' id='facekontrol' style='width:100%; height:auto; margin-top: 40%; margin - left:auto; margin - right:auto; '/>";
}
);
good work :)
Same issue, id and name works, email stopped working
I am using the facebookConnect api call to get a user's public profile information however the email address is coming back undefined. Is there something else i should add into the following code?
thanks