This is a kind of re-post of my question on Yahoo! forums. It is just that I refer to StackOverflow more frequently...
My problem is as following: while Yahoo! OAuth http://developer.yahoo.com/oauth/ is described as ready for use with mobile phones out-of-the-box it does not appear as such.
I have tried to implement sample application and use Yahoo! PHP SDK to connect with Yahoo! Using web browser it is all nice and easy. But while visiting Yahoo! request_auth page (http://developer.yahoo.com/oauth/guide/oauth-userauth.html) on my test mobile phone (Nokia 6300) it renders unacceptable: I am not able to see login box, cannot read information why my login would be required and all. I just see a page border and some text fragments ("Yahoo!", "Hel" (like in help...) et. al.).
Is there some parameter to force Yahoo! displaying mobile phone optimised page? I do redirect user to this address at the moment: https://api.login.yahoo.com/oauth/v2/request_auth
BTW: if I use Opera Mini - it renders page nicely, although ommiting information about my site (which is requesting log-in). Just that I cannot force all users to use Opera, or something.
Thanks in advance for any help.
I've looking for a solution to this all day and eventually stumbled upon this: http://pastebin.com/8tDnrfLc
Important bit reproduced below:
var authPageURL = "https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token=" + oauthToken;
var yahooMobileLoginUrl = "https://login.yahoo.com/m?&.src=oauth&.lang=en-us&.intl=us&.done=" + authPageURL;
Basically you direct the user to the mobile auth page and give it a url to go to when it's done. That url should be the original https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token=... url.
Works for me!
Yahoo! no doubt has a user-agent sniffing algorithm that determines what constitutes a mobile browser. Clearly Opera Mini triggers the right behavior. I suspect the native browser in the Nokia model you are using is not on the list, or it is emulating a desktop browser user-agent. Unfortunately I think you have to convince Yahoo! to deem your Nokia 6300 a mobile device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With