Thursday, July 23, 2015

Flickr authorisation URL doesn't work on certain browser components

Writing a Flickr app for Windows Phone I was confused as to why the authorisation URL was forwarding the user to http://m.flickr.com instead of the authorisation page after they logged in and I had to detect that and forward them to the authentication URL again. After a while even this stopped working, despite the fact that copying the URL into IE worked as expected, ie, after the user logged in they were forwarded to the authorisation page. For a while I was convinced Flickr must be discriminating by user agent string. The answer was staring me in the face, which was pointed to by an SO answer. Scripts weren't running on the browser in the app, they are disabled by default, you have to enable scripts in the Windows Phone WebBrowser component with IsScriptEnabld.