meteor-facebook-collections
meteor-facebook-collections copied to clipboard
Unable to get List of Friends
Hello, a few days ago I started to work with meteor and its functionality related to Facebook accounts. I want to work with friend lists, and because of that I find your package very useful. However, I am a bit lost and I don't get to request my friend list from Facebook.
The code is the next:
Template.facebooklogin.events({ 'click #facebook-login': function(event) { Meteor.loginWithFacebook({}, function(err){ if (err) { throw new Meteor.Error("Facebook login failed"); }else{ // Get List of Friends locally var Friends = FacebookCollections.getFriends("me",["id","name"]); Router.go('dashboard'); } }); } }); (Code executed while user access to my application via Facebook)
Template.dashboard.helpers({ friends: function() { return Friends.find(); } }); (Code executed after login, in the new dashboard page)
I am not sure if the problem is that the sentence to request Facebook friendlist is incorrect or there is another thing wrong. Can you help me with it?