获取 facebook 数字 ID 和个人资料图片 w/o facebook api 或 facebook sdk

Get a facebook numeric id and profile picture w/o facebook api or facebook sdk

我有一个问题。有没有办法让某人的 个人资料数字 ID 和个人资料图片,不使用访问令牌、facebook SDK 或 API。只用脚本?

我有这个代码:

function GetProfilePicture() 
{
var userId=prompt('userID please','id here')
var imglink="<img src='https://graph.facebook.com/" + userId + "/picture? type=large'>"

document.getElementById('profilepicture').innerHTML=imglink;
}

此代码用于粘贴用户的头像 在名为 "profile picture" 的 HTML 元素中,但由于 在 facebook 中更改,这不再有效。您需要数字 id 而不是用户 id(例如:JohnDoe) 这个代码工作。有没有我可以包含在我的代码中的脚本 所以它在提供 FaceBook id 后显示个人资料图片?

在人们开始误会我之前: 我只使用这个数字 id 来检索名称 & 个人资料图片。我不是mailing/spoofing/hijacking东西!我唯一想摆脱 url 的是 数字 ID,以及获取个人资料名称和个人资料图片的方法。我仅将其用于合法目的。

提前致谢!

似乎无法在不违反 facebook 服务条款的情况下检索此信息。 如果我以后可以找到方法(例如,当 ToS 发生变化时)。我将 post 放在这里。