简体   繁体   English

从 facebook 个人资料 URL 获取用户信息

[英]Get user infos from facebook Profile URL

Good morning all,大家早上好,

I must create a site in PHP where we enter the url of the facebook profile, and then it must retrieve some information from the profile:我必须在 PHP 中创建一个网站,我们在其中输入 facebook 个人资料的网址,然后它必须从个人资料中检索一些信息:

  • The profile picture个人资料图片
  • The name名字
  • If the profile and verify如果配置文件和验证

I wish I could do it without this connection.我希望我可以在没有这种联系的情况下做到这一点。 What to give me a clue?给我什么线索? (I succeeded with tiktok, instagram, etc.) but with facebook it's been a while that I'm looking for the solution (我在 tiktok、instagram 等方面取得了成功)但是在 facebook 上我已经有一段时间在寻找解决方案了

This is not possible for 2 reasons:这是不可能的,原因有两个:

  • Scraping is not allowed on Facebook, you must use the API for accessing any data Facebook 不允许抓取,您必须使用 API 来访问任何数据
  • Any user data is unavailable with the API, unless the user authorizes your App to access his data API 不提供任何用户数据,除非用户授权您的应用访问他的数据

The correct way to implement verification is to implement login with the Graph API and let the user authorize your App.正确的实现方式是通过Graph API实现登录,让用户对你的App进行授权。 Btw, this still does not mean you can verify his profile url, because you will not get the real URL, not even with authorization.顺便说一句,这仍然并不意味着您可以验证他的个人资料网址,因为您将无法获得真实的网址,即使获得授权也无法获得。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM