Note that there are some explanatory texts on larger screens.

plurals
  1. POYahoo OAuth on Android - 401 error
    primarykey
    data
    text
    <p>I'm trying to implement OAuth for Google, Twitter, Yahoo etc. on Android using the signpost libraries. </p> <p>All of the above work fine, except Yahoo, which gives me a 401 error when trying to retrieve the Request Token. I've tried modifying my callback url to an http one, and even tried Out of Band authentication. </p> <p>Does anyone have an idea on what I could be doing wrong ?</p> <p>My code which requests for the OAuth Request Token using Signpost libraries is pasted below. </p> <pre><code>private static CommonsHttpOAuthConsumer yahooConsumer = new CommonsHttpOAuthConsumer( YAHOO_CONSUMER_KEY, YAHOO_CONSUMER_SECRET); private static CommonsHttpOAuthProvider yahooProvider = new CommonsHttpOAuthProvider( YAHOO_REQUEST_URL, YAHOO_ACCESS_TOKEN_URL, YAHOO_AUTH_URL); </code></pre> <p>and </p> <blockquote> <p>String authURL = yahooProvider.retrieveRequestToken( yahooConsumer,YAHOO_REDIRECT_URL); startWebView(authURL); </p> </blockquote> <p><strong>EDIT:</strong></p> <p>Here's the output from the catched Exception : </p> <blockquote> <p>08-21 00:18:10.935: WARN/System.err(3752): oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match. 08-21 00:18:10.945: WARN/System.err(3752): at oauth.signpost.AbstractOAuthProvider.handleUnexpectedResponse(AbstractOAuthProvider.java:239) 08-21 00:18:10.945: WARN/System.err(3752): at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:189) 08-21 00:18:10.955: WARN/System.err(3752): at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)</p> </blockquote> <p>Thanks,</p> <p>Abhinav</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload