开发者

Getting Facebook event image using the facebook sdk for .Net with the graph API

When I try to execute:

      dynamic picture = fb.Get(string.Format("{0}/picture",id.ToString())); //("event-id/picture")

I get JsonReaderException - "Unexpected character encountered while parsing value: �. Line 1, position 1." at

      obj = JsonConvert.DeserializeObject(json, typ开发者_运维技巧e, SerializerSettings);

What wrong with my request?

Thanks in advance, Alon.


When retrieving pictures through the graph for profiles and events the graph url will resolve into the image url. You don't need to query the graph. This will get you the picture for an event (try it in your browser!):

http://graph.facebook.com/{eventid}/picture
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜