问题
I have a blog where people have their own profile page, and can also add their Facebook profile url. The idea would be to download automatically their Facebook events to their blog's personal page. People would just click on "get my Facebook events". For this it would first need to get their ID from the URL they added. The language I am using is PHP.
Is it possible to get any ID from Facebook URL without being the owner of the account?
回答1:
Without authorization, you do not get any data of a user - not even his ID. And even with authorization, you only get an "App Scoped ID". In order to get the events of a user, you have to authorize that specific user with the user_events
permission first. After that, you can get his events with the /me/events
endpoint.
Btw, scraping is not allowed on Facebook. You MUST use the Graph API in order to get data of users.
来源:https://stackoverflow.com/questions/38418740/get-facebook-id-from-url-of-any-profile-account