iphone - After authenticating token(ACCESS GRANTED), doesn't redirect to Callback URL -


i'm implementing oauth 1.0 in ios app using simple-oauth1 project. use withings api modified little bit simple-oauth1(like consumer oauth key, secret key, callback url...). , inserted

nslog(request.url.absolutestring); following code(it's in oauth1controller.m)

- (bool)webview:(uiwebview *)webview shouldstartloadwithrequest:(nsurlrequest *) request navigationtype:(uiwebviewnavigationtype)navigationtype {        if (_delegatehandler) {     nsstring *urlwithoutquerystring = [request.url.absolutestring componentsseparatedbystring:@"?"][0];     nslog(request.url.absolutestring);     if ([urlwithoutquerystring rangeofstring:oauth_callback].location != nsnotfound)     { 

with code,

  1. i tap oauth login button webview shows login page.

  2. i enter id/password.

  3. webview shows account allow page. tap "allow" button. (nslog shows http://oauth.withings.com/account/authorize?acceptdelegation=true&oauth_consumer_key=blahblah&oauth_nonce=blahblah&oauth_signature=blahblah&oauth_signature_method=hmac-sha1&oauth_timestamp=blahblah&oauth_token=blahblah&oauth_version=1.0&userid=blahblah)

after above process, webview shows "access granted" page oauth_token= blahblah, oauth_verifier=blahblah. doesn't redirect callback url, stays @ "access granted"page.

i've been doing 2 weeks cannot find answer why happening.

i had same issue (using php). problem seems must provide url callback @ request token step (first step, not authorization).

withings api not redirecting callback url (php / oauth)


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -