android - Meteor production app fail to use Facebook's user_friends permission -


i have mobile meteor app uses facebook api , manage users authentication , sign-ups accounts-facebook package.

as long tested app on meteor.com server , on local builds, following code provided made app use facebook's user_friends permission:

(that's under client/accounts.js)

accounts.ui.config({     requestpermissions: {         facebook: ['user_friends']     }  }); 

however, since deployed production mup, seems user_friends permission doesn't take effect on facebook anymore. going through mongodb can see in db.meteor_accounts_loginserviceconfiguration collection document facebook is:

{   _id: "gcmytcntxq3rtpmwm",   service: "facebook",   appid: "*********", // censored   loginstyle: "redirect",   secret: "***************************", // censored   requestpermissions: [     "user_friends"   ] } 

so meteor app knows should ask new users permission. looking @ facebook account application privacy settings can see in contrast non-production version had, there no "user friends" permission anymore app:

facebook no user friends permissions

since it's mobile app, tried editting accounts-config.js contain permission well:

serviceconfiguration.configurations.upsert(     { service: "facebook" },     {         $set: {             appid: "***********", // censored             loginstyle: "redirect",             secret: "********************************", // censored             requestpermissions: ['user_friends']         }     } ); 

because have customized login button while clicking it:

meteor.loginwithfacebook(['user_friends']); 

but had no success retrieving permissions. each time did these changes removed users , app facebook account , tried again new facebook login avoid fact can't override facebook's permissions exist user.

appearently used meteor.loginwith method wrong. should options object includes requestpermissions string array this, , problem solved:

        meteor.loginwithfacebook({requestpermissions: ['user_friends']}, function(err){             if (err){                 throw new meteor.error("facebook failure");             }         }); 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -