Well i don't know if it's possible but i want something that works like {{#if currentUser}} bla bla bla {{/if}} but with facebook only. It's for a custom facebook comments (i don't like the official one)
When you store a user that logs in with Facebook your users collection obtains a field called services. Here is how I handle images:
serviceImageUser = function () {
var user= Meteor.user();
if(!user)
return;
if (user.services)
{
if (user.services.facebook)
return user.services.facebook.picture;
if (user.services.twitter)
return user.services.twitter.profile_image_url;
if (user.services.google)
return user.services.google.picture;
if (user.services.instagram)
return user.services.instagram.profile_picture;
}
else
{
return user.profile.userProfile.picture;
}
};
You need to add 2 packages to get the Facebook login functionality working.
meteor add accounts-facebook
meteor add service-configuration
The accounts-facebook plugin enables facebook login and service-configuration allows to store the setup for our Facebook app’s ids.
As for templates:
<template name="name">
{{#if currentUser}}
{{currentUser.services.facebook.picture}}
{{/if}}
</template>