After I'm logged in using facebook account I have access to Meteor.userId()
So I tried to publish user data this way from the server:
Meteor.publish('getUserAccessToken', function(userId) {
return Meteor.users.find(userId).fetch();
});
And receive it on client:
Meteor.subscribe("getUserAccessToken",Meteor.userId());
then I would like to dig through returned user object to it's accessToken
console.log([Object].services.facebook.accessToken);
but since I remove autopublish services.facebook
disappear for client.
Thanks in advance for any help.
Aucun commentaire:
Enregistrer un commentaire