Get Facebook ID from URL of any profile account

人走茶凉 提交于 2020-01-07 02:59:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!