Is it possible to get the User Id without the auth

2019-02-21 06:40发布

问题:

Is it possible to get the user ID without authorization?

It used to work with getUser but it doesn't now. Are these new changes from Facebook or is there any other possibility to get user ID or the name to welcome the user?

回答1:

No, users must give permission before you can get their user id.



回答2:

See http://developers.facebook.com/docs/reference/api/permissions/

Basic Information

When a user allows you to access their basic information in an auth dialog, you have access to their user id, name, profile picture, gender, age range, locale, networks, user ID, list of friends, and any other information they have made public.

To get access to any additional information about the user or their friends you need to ask for specific permissions from the user.