0

I have a PassportJS-based code which uses Facebook to login my users into the web app. I have two apps defined on Facebook. When I use one of the apps I'm getting all the info about the user (in this case the user is me), including username, hometown, etc. However, when I use another app (I change only app id and the secret, the rest of the code is the same) some of the user profile details are not available.

Do you have any idea what might be the issue here? Is it something with the app settings?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Jakub
  • 3,129
  • 8
  • 44
  • 63

1 Answers1

1

Apps created after 4/30/2014 use version 2.0 of the Graph API, and username is no longer provided.

https://developers.facebook.com/docs/graph-api/reference/v2.0/user/

Fosco
  • 38,138
  • 7
  • 87
  • 101
  • Makes sense. But what about other data, like hometown? – Jakub Jun 17 '14 at 20:06
  • try requesting the user_hometown permission – Fosco Jun 17 '14 at 20:19
  • It almost solved it, however, when I try to get access to user's facebook data I can see the following message: "The following permissions have not been approved for use: user_hometown. If you make your app public, they will not be shown to people using your app. Submit them for review or learn more." – Jakub Jun 18 '14 at 07:15
  • You need to go to your app settings and request permission to use that permission :) – Phil Wallach Jun 18 '14 at 14:50