3

Cross authentication of a dropbox user using Access token and secret not happening.

Elaborating my Question:

  1. authenticate the user in my IOS app
  2. In Ios app , I retrieve access token and secret from MPOAuthCredentialConcreteStore *credentials.
  3. get the access token from credentials->acccessToken and similarly the secret.

  4. Now if I feed these values into another app outside IOS which uses python sdk for dropbox. I get a error message "Invalid token".

But, interestingly the reverse process from step 1 to 4 works. i.e get access token and secret from python SDK and feed it to my IOS app by using

[dbSession updateAccessToken:@"xxxxxxxxx" accessTokenSecret:@"YYYYYYYYYYY" forUserId:@"12345678"];

and now i can assess user's dropbox account. Any idea as to whats going wrong? Is there a difference between MPoauth and Oauth? I believe MPoauth is just a wrapper right?

is there any other way to get the access token and secret?

Thanks for the help.

4

2 回答 2

1

我找到了解决方法。这是一个简单的错误。基本上我使用的编辑器在最后添加了一个新行字符。对于遇到相同问题的人,请确保最后没有换行符。

于 2012-11-29T19:42:13.553 回答
1

您可以Access token通过使用此委托来获取您的

(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *) url {

    if ([[DBSession sharedSession] handleOpenURL:url]) { 
        if ([[DBSession sharedSession] isLinked]) { 
            // At this point you can start making API calls

            NSLog(@"App linked successfully!");

        }
        // Add whatever other url handling code your app requires here 
     } 

     return NO;
 }

给定的 url 有访问令牌、秘密令牌和用户 ID

于 2013-03-02T07:37:03.013 回答