facebook获取好友头像

1.获取用户头像。facebook的只要知道用户的ID或name就可以获取了。一般是获取最大的然后resize成需要的。地址如下:

?
http://graph.facebook.com/randy.ran.12327/picture?type=large
//or
http://graph.facebook.com/100000396765290/picture?type=large
2.获取好友列表及查看好友是否已经使用了此的APP,请求地址:

?
https://graph.facebook.com/me/friends?fields=id,name,installed&limit=5000&offset=0
3.API方式分享:
public static BoolMessage Share(string token, string name, string link, string caption, string description, string source, string message)
{
    Dictionary<string, string> dic = new Dictionary<string, string>();
    dic.Add("name", name);
    dic.Add("link", link);
    dic.Add("caption", caption);
    dic.Add("description", description);
    dic.Add("source", source);
    dic.Add("privacy", "{\"value\": \"EVERYONE\"}");
    dic.Add("message", message);
    dic.Add("access_token",token);
    string url = "https://graph.facebook.com/me/feed";
    return HttpHelper.WebRequest(HttpHelper.Method.POST, url,dic);
}

猜你喜欢

转载自jykenan.iteye.com/blog/1841079