Open himanshumistri opened 9 years ago
Never used the Android SDK so maybe I'm misunderstanding but it doesn't look like you are passing the oauth_verifier
in the authorization parameters.
Here's how my application's authentication flow looks like (note the oauth_callback
never changes):
Request token:
Authorize request token:
Exchange request token + verifier for an access token:
Use the access token for an authenticated request:
Hope this helps :)
Hi @Himanshu4003,
It looks like you are attempting an OAuth flow that's not supported by the Android SDK.
Please take a look at the documentation here: https://github.com/500px/api-documentation/blob/master/authentication/POST_oauth_accesstoken.md. The 500px Android SDK supports the xAuth workflow. To see how it works with Facebook and Google, you can see here: https://github.com/500px/500px-android-sdk/blob/master/src/main/java/com/fivehundredpx/api/auth/FacebookAuthProvider.java and here: https://github.com/500px/500px-android-sdk/blob/master/src/main/java/com/fivehundredpx/api/auth/PlusAuthProvider.java, wherein the Facebook token and Plus Token were respectively obtained from Facebook and Google's corresponding service for the user.
Hi @machx0r Thanks for your input on Auth Flow now i understand it's correctly and it's working fine.
I am able to get request_token from OAuthAuthorization from android-sdk but here i am using my site as call back http://android-vogue.blogspot.in/ and i am able to get redirection in WebView when i open my Auth url and it's look like http://android-vogue.blogspot.in/?oauth_token=mytoken&oauth_verifier=auth_verfier key Now i am passing this Url for get accessToken .But i am getting below Error:
Here is my Auth 1.0 Request :
OAuth oauth_callback="http://android-vogue.blogspot.in/?oauth_token=hULQrDHjDGVZcCt8IyEIuivxcOeagdWhI0KGjePS&oauth_verifier=GXN6d3ZK625GqgRjWvl3http%3A%2F%2Fandroid-vogue.blogspot.in%2F%3Foauth_token%3DhULQrDHjDGVZcCt8IyEIuivxcOeagdWhI0KGjePS%26oauth_verifier%3DGXN6d3ZK625GqgRjWvl3", oauth_consumer_key="Key", oauth_nonce="1434714669", oauth_signature="9l9XZpe2y32RePKDOpT66qXym0U%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1434714666", oauth_token="hULQrDHjDGVZcCt8IyEIuivxcOeagdWhI0KGjePS", oauth_version="1.0"
photos W/DefaultRequestDirector﹕ Authentication error: Unable to respond to any of these challenges: {} 06-19 07:19:31.090 27726-27928/com.xxxxx.fivephotos W/System.err﹕ com.fivehundredpx.api.FiveHundredException 06-19 07:19:31.091 27726-27928/com.xxxx.fivephotos W/System.err﹕ at com.fivehundredpx.api.auth.OAuthAuthorization.getAccessToken(OAuthAuthorization.java:122)