-1

Login seems to go ok, with the email permission,

however when doing:

var deferred = $q.defer(); $openFB.api({ path: '/me/email'

  }).then(function( res ) {
    deferred.resolve(res);
    //angular.extend(me, {picture: res.data.url});
  }).catch(function(err){
    console.log(err);
    deferred.reject(err);
  });

I get an error wrong path.

Ben

BenA
  • 59
  • 1
  • 2
  • 7

1 Answers1

0

/me/email is not a valid endpoint. This is how you get the email of a user: /me?fields=email

The error (from the API Explorer):

{
  "error": {
    "message": "Unknown path components: /email",
    "type": "OAuthException",
    "code": 2500,
    "fbtrace_id": "FBdZx0Yntxz"
  }
}
andyrandy
  • 72,880
  • 8
  • 113
  • 130