Reputation: 2701
I'm trying to use simple-oauth1 to log into the Withings API. I am able to get the login page to appear, but when I enter my account details and then hit sign in, the page just refreshes instead of taking me to the "authorize app" page.
I'm using the following settings at the top of OAuth1Controller.m
- haven't changed anything else. (You'll have to replace the consumer key and secret with your own copies.)
#define OAUTH_CALLBACK @"http://www.mysite.com"
#define CONSUMER_KEY @"REDACTED"
#define CONSUMER_SECRET @"REDACTED"
#define AUTH_URL @"https://oauth.withings.com/"
#define REQUEST_TOKEN_URL @"account/request_token"
#define AUTHENTICATE_URL @"account/authorize"
#define ACCESS_TOKEN_URL @"account/access_token"
#define API_URL @"https://oauth.withings.com"
#define OAUTH_SCOPE_PARAM @""
Can anyone tell me what I'm doing wrong here? I'm able to use the exact same code to login to the Fitbit API just fine.
Upvotes: 0
Views: 252
Reputation: 395
Perhaps you need to add OAuth-callback parameter in the time of Authorizing the app.Also the API url will be like this.
#define API_URL @"http://wbsapi.withings.net/"
you can check out this link.. http://integratingwithings.blogspot.in/2014/05/withings-api-declassified-ios.html
Upvotes: 2