获取用户的个人资料:www.facebook.com/profile.php?id=0123456789



我写了下面的代码:

var client = new FacebookClient();
string str, profile_name;
foreach (var myFriend in @Model.Friends.Data)
{
    str = myFriend.Link.ToString();
    profile_name = str.Substring(@str.LastIndexOf('/') + 1);
    dynamic me = client.Get(profile_name);
}

它传递我的朋友列表的所有链接(例如:http://www.facebook.com/mariah.carey.62),只接受最后一个字符串:/(在本例中是:mariah.carey.62)之后的字符串,并获得公共信息(性别,姓名等)。

我的问题是:有几个链接看起来像:http://www.facebook.com/profile.php?id=0123456789。则profile_name为:profile.php?id=0123456789。假设发送成功:client.Get("0123456789")。该用户的曲线图如下:

"id": "0123456789",
"name": "u05d0u05e1u05e0u05ea u05d0u05d4u05e8u05d5u05df",
"first_name": "u05d0u05e1u05e0u05ea",
"last_name": "u05d0u05d4u05e8u05d5u05df",
"link": "https://www.facebook.com/people/u05d0u05e1u05e0u05ea-
u05d0u05d4u05e8u05d5u05df/0123456789",
"gender": "female",

(图表在:http://graph.facebook.com/0123456789)

如何获得该用户的可理解数据?我查到的名字说明不了什么。也许有办法解密

我用过:

System.Text.RegularExpressions.Regex.Unescape(str);

相关内容

最新更新