OthetaStent
New Member
i want to fetch instagram images in asp.net, for that i am using instagrams api, which is returning me below JSON\[code\]{ "pagination": {}, "meta": { "code": 200 }, "data": [ { "attribution": null, "tags": [ "mpnnamm2013" ], "type": "image", "location": null, "comments": { "count": 0, "data": [] }, "filter": "Hudson", "created_time": "1358880054", "link": "http://instagr.am/p/Uy-QLTBP5G/", "likes": { "count": 0, "data": [] }, "images": { "low_resolution": { "url": "http://distilleryimage2.s3.amazonaws.com/40ffff9064c311e29b2022000a9f1561_6.jpg", "width": 306, "height": 306 }, "thumbnail": { "url": "http://distilleryimage2.s3.amazonaws.com/40ffff9064c311e29b2022000a9f1561_5.jpg", "width": 150, "height": 150 }, "standard_resolution": { "url": "http://distilleryimage2.s3.amazonaws.com/40ffff9064c311e29b2022000a9f1561_7.jpg", "width": 612, "height": 612 } }, "caption": { "created_time": "1358880075", "text": "Test5 #mpnnamm2013", "from": { "username": "electronicmusicianmag", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "id": "288720318", "full_name": "Electronic Musician" }, "id": "374635685132697389" }, "user_has_liked": false, "id": "374635509550743110_288720318", "user": { "username": "electronicmusicianmag", "website": "", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "full_name": "Electronic Musician", "bio": "", "id": "288720318" } }, { "attribution": null, "tags": [ "mpnnamm2013" ], "type": "image", "location": null, "comments": { "count": 0, "data": [] }, "filter": "Hudson", "created_time": "1358879998", "link": "http://instagr.am/p/Uy-JXqhP5B/", "likes": { "count": 0, "data": [] }, "images": { "low_resolution": { "url": "http://distilleryimage9.s3.amazonaws.com/1fc50cb264c311e2a73722000a1f9317_6.jpg", "width": 306, "height": 306 }, "thumbnail": { "url": "http://distilleryimage9.s3.amazonaws.com/1fc50cb264c311e2a73722000a1f9317_5.jpg", "width": 150, "height": 150 }, "standard_resolution": { "url": "http://distilleryimage9.s3.amazonaws.com/1fc50cb264c311e2a73722000a1f9317_7.jpg", "width": 612, "height": 612 } }, "caption": { "created_time": "1358880014", "text": "Test4 #mpnnamm2013", "from": { "username": "electronicmusicianmag", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "id": "288720318", "full_name": "Electronic Musician" }, "id": "374635169669513000" }, "user_has_liked": false, "id": "374635041793572417_288720318", "user": { "username": "electronicmusicianmag", "website": "", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "full_name": "Electronic Musician", "bio": "", "id": "288720318" } }, { "attribution": null, "tags": [ "mpnnamm2013" ], "type": "image", "location": null, "comments": { "count": 0, "data": [] }, "filter": "Amaro", "created_time": "1358879946", "link": "http://instagr.am/p/Uy-C-_hP45/", "likes": { "count": 0, "data": [] }, "images": { "low_resolution": { "url": "http://distilleryimage9.s3.amazonaws.com/0095c65664c311e2a58222000a1fb810_6.jpg", "width": 306, "height": 306 }, "thumbnail": { "url": "http://distilleryimage9.s3.amazonaws.com/0095c65664c311e2a58222000a1fb810_5.jpg", "width": 150, "height": 150 }, "standard_resolution": { "url": "http://distilleryimage9.s3.amazonaws.com/0095c65664c311e2a58222000a1fb810_7.jpg", "width": 612, "height": 612 } }, "caption": { "created_time": "1358879965", "text": "Test 3 #mpnnamm2013", "from": { "username": "electronicmusicianmag", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "id": "288720318", "full_name": "Electronic Musician" }, "id": "374634762176102168" }, "user_has_liked": false, "id": "374634602985487929_288720318", "user": { "username": "electronicmusicianmag", "website": "", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "full_name": "Electronic Musician", "bio": "", "id": "288720318" } }, { "attribution": null, "tags": [ "mpnnamm2013" ], "type": "image", "location": null, "comments": { "count": 0, "data": [] }, "filter": "Rise", "created_time": "1358879815", "link": "http://instagr.am/p/Uy9zB2hP4q/", "likes": { "count": 0, "data": [] }, "images": { "low_resolution": { "url": "http://distilleryimage2.s3.amazonaws.com/b2ad166064c211e2884a22000a9f1588_6.jpg", "width": 306, "height": 306 }, "thumbnail": { "url": "http://distilleryimage2.s3.amazonaws.com/b2ad166064c211e2884a22000a9f1588_5.jpg", "width": 150, "height": 150 }, "standard_resolution": { "url": "http://distilleryimage2.s3.amazonaws.com/b2ad166064c211e2884a22000a9f1588_7.jpg", "width": 612, "height": 612 } }, "caption": { "created_time": "1358879836", "text": "Test2 #mpnnamm2013", "from": { "username": "electronicmusicianmag", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "id": "288720318", "full_name": "Electronic Musician" }, "id": "374633681832443640" }, "user_has_liked": false, "id": "374633506544090666_288720318", "user": { "username": "electronicmusicianmag", "website": "", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "full_name": "Electronic Musician", "bio": "", "id": "288720318" } }, { "attribution": null, "tags": [ "mpnnamm2013" ], "type": "image", "location": null, "comments": { "count": 1, "data": [ { "created_time": "1358879889", "text": "#mpnnamm2013", "from": { "username": "electronicmusicianmag", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "id": "288720318", "full_name": "Electronic Musician" }, "id": "374634124876775174" } ] }, "filter": "Amaro", "created_time": "1358450634", "link": "http://instagr.am/p/UmLMsThP4G/", "likes": { "count": 0, "data": [] }, "images": { "low_resolution": { "url": "http://distilleryimage2.s3.amazonaws.com/6e7dcbe660db11e2a73f22000a9e28ad_6.jpg", "width": 306, "height": 306 }, "thumbnail": { "url": "http://distilleryimage2.s3.amazonaws.com/6e7dcbe660db11e2a73f22000a9e28ad_5.jpg", "width": 150, "height": 150 }, "standard_resolution": { "url": "http://distilleryimage2.s3.amazonaws.com/6e7dcbe660db11e2a73f22000a9e28ad_7.jpg", "width": 612, "height": 612 } }, "caption": { "created_time": "1358450636", "text": "Test", "from": { "username": "electronicmusicianmag", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "id": "288720318", "full_name": "Electronic Musician" }, "id": "371033290070883498" }, "user_has_liked": false, "id": "371033270022110726_288720318", "user": { "username": "electronicmusicianmag", "website": "", "profile_picture": "http://images.instagram.com/profiles/anonymousUser.jpg", "full_name": "Electronic Musician", "bio": "", "id": "288720318" } } ]}\[/code\]and here's ASP.net Code:\[code\]public class Instagram{ public ArrayList pagination = new ArrayList(); public Meta meta = new Meta(); public List<Data> data = http://stackoverflow.com/questions/14470057/new List<Data>();}public class Meta{ public int code;}public class Data{ public Images images = new Images(); public string[] tags; public string attribution; public string type; public string location; public string filter; public string created_time; public string link; public Comments comments = new Comments(); public Likes likes = new Likes(); public Caption caption = new Caption(); public bool user_has_liked; public string id; public User user = new User();}public class User{ public string username; public string website; public string profile_picture; public string full_name; public string bio; public string id;}public class Caption{ public string created_time; public string text; public string id; public From from = new From();}public class From{ public string username; public string profile_picture; public string id; public string full_name;}public class Likes{ public int count; public string[] data;}public class Comments{ public int count; public string[] data;}public class Images{ public LowResolution low_resolution = new LowResolution(); public Thumbnail thumbnail = new Thumbnail(); public StandardResolution standard_resolution = new StandardResolution();}public class LowResolution{ public string url { get; set; } public int width { get; set; } public int height { get; set; }}public class Thumbnail{ public string url { get; set; } public int width { get; set; } public int height { get; set; }}public class StandardResolution{ public string url { get; set; } public int width { get; set; } public int height { get; set; }}public partial class Portals__default_Skins_AVN_Skin : DotNetNuke.UI.Skins.Skin{ protected void Page_Load(object sender, EventArgs e) { try { WebRequest request = WebRequest.Create("instagram api call url"); WebResponse response = request.GetResponse(); StreamReader read = new StreamReader(response.GetResponseStream()); JavaScriptSerializer sear = new JavaScriptSerializer(); Instagram instagrams = JavaScriptConvert.DeserializeObject<Instagram>(read.ReadToEnd()); Response.Write(instagrams.data[0].images.low_resolution.url); } catch (Exception ex) { Response.Write(ex.ToString()); } /*for (int i = 0; i < instagrams.data.Length - 1; i++) { Response.Write(instagrams.data.images[0].low[0].Url + "<br/>"); }*/ }}\[/code\]can anyone let me know what could be the issue