In meinem MeteorJs bei der Anmeldung App Sie dürfen mit Facebook anmelden, wenn sie mit Facebook sein Profil in nicht automatisch gefüllt anmelden.Profil Nicht Filling Wenn Mit Facebook
addFacebookInformationToProfile() {
if (Meteor.isServer) {
// This will only merge in information the first time, then ignore it once the flag is true
const user = Meteor.user();
let username = slugify(user.services.facebook.name, '');
let i = 1;
while (Meteor.users.findOne({username})) {
username = slugify(user.services.facebook.name, '') + '' + i;
i++;
}
Meteor.users.update({ _id: Meteor.userId(), 'profile.facebook': { $ne:true }}, {
$set: {
'profile.email': user.services.facebook.email,
'profile.name': user.services.facebook.name,
'username': username,
'profile.gender': user.services.facebook.gender,
'profile.picture': "https://graph.facebook.com/" + user.services.facebook.id + "/picture/?width=150&height=150",
'profile.facebook': true
}
});
}
},
Als ich console.log
das Profil. Bildzeile Ich erhalte eine URL, die bei der Eingabe im Browser das Profilbild des Facebook-Benutzers anzeigt.
Zum Beispiel: (http://graph.facebook.com/100004071683764/picture/?width=150&height=150)
Dies ist, wie es in der aktuellen App zeigt: (https://www.dropbox.com/s/6n1svdq56x6ctx8/Screenshot%202016-05-13%2017.24.06.png?dl=0)
Wie zeige ich das Profilbild des Nutzers im Kreis oben statt das graue Feld um die Kreis.
Hintergrund:
Wir verwenden imgix und s3 unsere Daten zu nehmen.
Die App hier gehostet wird relyphe.com