0

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

Mustafa
  • 1,738
  • 2
  • 24
  • 34

1 Answers1

1

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

Community
  • 1
  • 1
Mário
  • 1,603
  • 14
  • 24
  • I am not using accounts ui package. And Facebook doesn't need review all permissions. Just some like birthday . Correct me if I am wrong please. I know this because when I did the borthdY permission the fAcebook popup dialog explicitly warned me to review . But not for friends list. – Mustafa Nov 23 '14 at 15:05
  • wow how stupid of me. I get it. I need to make another request for the friends list with another call to the graph api. – Mustafa Nov 23 '14 at 15:19
  • You need to ask for the permissions you if you want all Facebook to able to login in your App. If the review doesn't feel that your app is ready, the review will be denied. Just happened to me last week. – Mário Nov 23 '14 at 22:15
  • Thanks, your last sentence fbgraph made me realise what i was doing wrong. I actually worked with fb graph api before, never thought that i had to make individual request to grab more data like friends list etc. But what about my first question? Do i configure the permission with the serviceconfiguration because it doesn't take effect when i do that unless i do it with meteor.loginwithfacebook – Mustafa Nov 24 '14 at 00:00
  • On one of my current projects, we don't defined the permission at accounts config. We simply build the Facebook Query and run it using `fbgraph`. We're using Facebook login but it's separated components, it doesn't share any common code. – Mário Nov 24 '14 at 00:04