Hi Andrew,
Thanks for replying. Unfortunately my post on the instagram developers google group isn't even getting approved (no errors, just never showing up). Also, I see a similiar problem/question posted a year ago and it never got a reply. I'm guessing they have bigger fish to fry or something. To try to push forward I did a few things on my end.
First I tacked the state={HttpContext.Session.SessionID} string onto my callbackUri param. This got me past the first issue but right into the next. Your StripMessagePartsFromQueryString() call takes the state= part back out of the callbackUrl value. So then when we call back to get the token and pass a different callback value the server gives 400.
Now if I build the url by hand in the debugger and put my state= string back into the callback value for this second call we actually get back a successful response with an access token but then DeserializeJsonAsFlatDictionary throws an exception citing "the maximum read depth (2) has been exceeded because XML data being read has more levels of nesting than is allowed by the quota". Apparently the returned JSON is upsetting.
"{\"access_token\":\"38478976.b0722de.2e3789c97bd14fb1b79a789f47d68e6c\",\"user\":{\"username\":\"myusername\",\"bio\":\"\",\"website\":\"\",\"profile_picture\":\"http:\\/\\/
images.instagram.com\\/profiles\\/anonymousUser.jpg\",\"full_name\":\"My Full Name\",\"id\":\"123456\"}}"
So I just can't catch a break on this one! :-)
If you have any ideas or if I can supply any more info please let me know.
Thanks
-JT
On Sunday, July 1, 2012 6:55:44 PM UTC-5, Andrew Arnott wrote:
I would suggest you start with contacting instagram telling them that their implementation is buggy and they should fix it. In my experience, folks are usually pretty responsive to fixing their service when the spec is clearly different.
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death your right to say it." - S. G. Tallentyre