Reputation: 35
I'm coding an app which uses oauth to login to facebook, and I am getting a parse exception for the Access token returned in the URL I intercept.
ERROR:
01-25 10:07:31.856: W/System.err(19312):
org.codehaus.jackson.JsonParseException: Unexpected character ('a' (code 97)):
expected a valid value (number, String, array, object, 'true', 'false' or 'null')
MY AUTH URLS
// private static final String[] Social_Urls = new String[]
// {Access_Token_Url, Authorization_Url, Redirect_URL,Client_Id,
// Client_Secret};
private static final String[] Facebook_Urls = new String[] {
"https://graph.facebook.com/oauth/access_token",
"https://www.facebook.com/dialog/oauth?client_id={CLIENT_ID&}&redirect_uri={https://www.google.com/}",
"https://www.google.com/", "CLIENT_ID",
"CLIENT_ID" };
(Yes I did use the actual Client Id and not CLIENT_ID)
I am using Wuman's oauth client library, if code is needed from the library I can give it.
Upvotes: 0
Views: 542
Reputation: 1063
You are trying to parse a string that is not a valid JSON string.
Upvotes: 1
Reputation: 6726
Are you sure you are parsing the Access-Token? You say you are logging into facebook, but your example contains the URL from google with an authorization code (this is not access-token!).
Why do you assume Access-Token has a JSON format? According to OpenID Connect, ID-Tokens are in JWT but Access-Tokens might be anything.
Upvotes: 0