Facebook 通过电子邮件地址搜索用户?

Facebook 通过电子邮件地址搜索用户?,facebook,Facebook,我在这里遇到了一些问题,它们提出了同样的问题,但现在可能已经过时了 我只是尝试查询Graph API,通过电子邮件地址搜索用户。我一直在努力: https://graph.facebook.com/search?q={EMAIL}&type=user&access_token=*** 但这会返回一个错误: { "error": { "message": "(#200) Must have a valid access_token to access this

我在这里遇到了一些问题,它们提出了同样的问题,但现在可能已经过时了

我只是尝试查询Graph API,通过电子邮件地址搜索用户。我一直在努力:

https://graph.facebook.com/search?q={EMAIL}&type=user&access_token=***
但这会返回一个错误:

{
   "error": {
      "message": "(#200) Must have a valid access_token to access this endpoint",
      "type": "OAuthException",
      "code": 200
   }
}

这是否不再受支持?如果我只搜索一个名字而不是一封电子邮件,效果很好。

不幸的是,这一行为似乎在几个月前从Facebook API中删除了。以下是11月初的一个相关问题:


无论如何,这不是一个完美的解决方案,但可能总比什么都没有好

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.facebook.com/search.php?q=".rawurlencode($email));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/7.0.1 Safari/537.73.11');
$response = curl_exec($ch);

$response = html_entity_decode($response);
$response = explode(',"id":', $response);
$id = $response[1];
$id = substr($id, 0, strpos($id, ',')); //FB ID of the first person in the results.
它似乎比图形搜索返回的结果要少得多,但它适用于很多人,前提是他们的隐私设置没有完全启动