Facebook C#SDK MVC3-client.Get(";me/picture";)无效的JSON字符串错误
在图形API浏览器上,如果我这样做Facebook C#SDK MVC3-client.Get(";me/picture";)无效的JSON字符串错误,facebook,facebook-graph-api,facebook-c#-sdk,Facebook,Facebook Graph Api,Facebook C# Sdk,在图形API浏览器上,如果我这样做 https://graph.facebook.com/me/picture 我要找回我的照片。然而在Facebook C#SDK MVC 3中 如果我这样做 var client = new FacebookClient(AccessToken); ViewBag.UserPicture = client.Get("me/picture"); 我犯了一个错误 无效的JSON字符串 我做错了什么?/me/picture返回一个指向图片URL的HTTP重定向,
https://graph.facebook.com/me/picture
我要找回我的照片。然而在Facebook C#SDK MVC 3中
如果我这样做
var client = new FacebookClient(AccessToken);
ViewBag.UserPicture = client.Get("me/picture");
我犯了一个错误
无效的JSON字符串
我做错了什么?
/me/picture
返回一个指向图片URL的HTTP重定向,以便您可以在标记中使用它
如果您希望它以JSON格式返回,access/me?fields=picture
/me/picture
将返回一个指向图片URL的HTTP重定向,以便您可以在标记中使用它
var me = client.Get("me", new { fields = "id,name,first_name,last_name,link,username,gender,locale,email,picture,birthday" }) as IDictionary<string, object>;
如果您想将其恢复为JSON格式,请访问/me?fields=picture
var me=client.Get(“me”,new{fields=“id,name,first\u name,last\u name,link,username,gender,locale,email,picture,birth”})作为IDictionary;
var me = client.Get("me", new { fields = "id,name,first_name,last_name,link,username,gender,locale,email,picture,birthday" }) as IDictionary<string, object>;
var me=client.Get(“me”,新的{fields=“id,name,first\u name,last\u name,link,username,gender,locale,email,picture,birth”})作为IDictionary;