Open GoogleCodeExporter opened 9 years ago
The problem is that Google is sending URL encoded token with \ (backslash)
character in it. The workaround I found for this issue is to decode token key
and secret like this:
requestToken.key = URLEncoding.decode(requestToken.key);
requestToken.secret = URLEncoding.decode(requestToken.secret);
I believe the same could be done in the OAuthUtil.getTokenFromResponse and it
all would work.
p.
Original comment by Piotr.Walczyszyn
on 26 Jan 2011 at 3:48
I just came up with even better solution. Instead of using
OAuthUtil.getTokenFromResponse to decode the token you can use URLVariables as
follows:
var vars:URLVariables = new URLVariables(URLLoader(event.currentTarget).data);
requestToken = new OAuthToken(vars.oauth_token, vars.oauth_token_secret);
All this should be done for both request and access tokens. Also remember to
URLEncoding.decode oauth_verifier because it may also contain backslashes.
p.
Original comment by Piotr.Walczyszyn
on 26 Jan 2011 at 8:31
Original issue reported on code.google.com by
milkisev...@gmail.com
on 8 Jul 2010 at 9:44