Publish and Subscribe did not work. Please find the solution as an answer down below.
Initial question: I am trying to publish the facebook first_name which is automatically retrieved when logging in with the accounts facebook package in Meteor (stored in the user collection under services.facebook). I have autopublish and insecure removed.
What I have tried so far looks like this:
Server side
Meteor.publish("facebook_name", function() {
return Meteor.users.find({_id: this.userId},
{fields: {'services.facebook.first_name' : true} });
});
Client side
Meteor.subscribe('facebook_name');
What I am using in my template to display it is this
<div class="Name"><p>{{currentUser.services.facebook.first_name}}</p></div>
Before removing autopublish the name showed up in the template.