Facebook request permission

1.6k views Asked by At

I have 2 questions

Does the requestPermissions field go here(Running on click)

 Meteor.loginWithFacebook({requestPermissions: ['user_friends']});

or here

ServiceConfiguration.configurations.insert({
  service: "facebook",
  appId: Meteor.settings.facebook.appId,
  secret: Meteor.settings.facebook.secret,
  requestPermissions: ['user_friends']
});

When adding the requestPermissions field to the ServiceConfiguration, it does not seem to take any effect.

Both options don't show the friendslist on the services.facebook field. where can i find the friends list? Is this a bug with the current facebook accounts package? I also tried doing this

Accounts.onCreateUser(function (options, user) {
  debugger;
  // nothing here, options just holds name.
  return user;
});

Help please

1

There are 1 answers

5
Mário On

Check: http://docs.meteor.com/#/full/accounts_ui_config and also https://developers.facebook.com/docs/reference/fql/permissions/

You need ask Facebook for the permissions, there's a review process for this. It's useless to request a permission that Facebook didn't provided you. Read this topic about recent facebook changes to the API: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

I'm using the fbgraphpackage to query Facebook: https://github.com/criso/fbgraph