开发者

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

开发者 https://www.devze.com 2023-02-16 02:51 出处:网络
When I try to execute: dynamic picture = fb.Get(string.Format(\"{0}/picture\",id.ToString())); //(\"event-id/picture\")

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

精彩评论

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