How to get access token from Yahoo OAuth integration in iOS?
Asked Answered
F

1

6

Where to enter that code I am following this link: https://github.com/yahoo/yos-social-objc for retrieving yahoo contacts.

After providing all the credentials (i.e secret key, consumer key, app id) it is going to Safari browser for login. But after logged in, it's displaying this message:

To complete sharing of yahoo! info with xxxx, enter code xxxx into xxxx

So, I am not getting that where I should enter this code? And how will it redirect to my application.

Is something missing in Plist what should i have to add in Plist?

Any help will be appreciated.

Flurry answered 18/10, 2013 at 6:41 Comment(1)
Same issue here... Can u please help me with it !Lochia
P
0

Go through this to get Auth Key--

https://github.com/ddsakura/iOS-Yahoo-OAuth-Example

CloudSponge has an iOS widget for its contact importer. Visit test drive page from your iOS device to see how it works.

I work for CloudSponge, please let me know if you have any questions.

this will surely work:

I didn't work with the Yahoo! API yet, but in oauth it works like that:

Create an url scheme in your app. You can do that in the Info section of your project settings (URL types). Name the scheme whatever you want, for example your app id.

When you authenticate your app, you can pass a parameter named oauth_callback. Here you have to pass the name of the just created url scheme.

This should be it - when the login is ok on the Yahoo side, it will try to open the app that is registered for the url scheme it got as callback parameter.

UPDATE:

From the Yahoo! API documentation - this is the call you do when requesting the oauth token somewhere in your code (I filled in your url scheme as the callback, this is how it should look like):

https://api.login.yahoo.com/oauth/v2/  
  get_request_token?oauth_nonce=ce2130523f788f313f76314ed3965ea6  
  &oauth_timestamp=1202956957  
  &oauth_consumer_key=123456891011121314151617181920  
  &oauth_signature_method=plaintext  
  &oauth_signature=abcdef  
  &oauth_version=1.0  
  &xoauth_lang_pref="en-us"  
  &oauth_callback="JCzOzd44://"

Of course the request should be signed.

Polo answered 18/10, 2013 at 11:10 Comment(1)
thanks for your answer but my problem is i have to import yahoo calender event for that i want accesstoken when user logged in successfullyFlurry

© 2022 - 2024 — McMap. All rights reserved.