Question


I am new in using oAuth and Yahoo! API in an iOS app. I am trying to access my Yahoo! contacts from my iOS app.

I have tried many ways found in StackOverflow. Most of those directed to http://developer.yahoo.com/social/rest_api_guide/contact_api.html; but, I really can not understand all the stuffs described there.

I also found another framework with example resource in https://github.com/yahoo/yos-social-objc. I am working with this one (the example included in this framework) and got into a trouble here that, when I use the YOAuth to authenticate the app, it opens up the Safari browser and after log into the Yahoo! account is shows an Agreement page. And upon agreement it is showing a page with message

To complete sharing of Yahoo! info with MYAPP, enter code "THECODE" into MYAPP

I do not really know that, what to do with this?

Now I need someone to help me out with this so that, my app get authorized successfully and redirected to my app from Safari with a minimum overhead.

Thanks in advance.

Was it helpful?

Solution

I have found the solution though with a little overheads.

Steps are: 1> Create a PHP script in you own server (say named, YRedirect.php).
2> Pest the following code in it-

<?php
 $query = $_SERVER['QUERY_STRING'];
 header("Location: YOUR_APP_ID_OR_BUNDLE_ID://oauth-response?" . $query);
?>


3> Add an URL Scheme in your info.plist file with the YOUR_APP_ID_OR_BUNDLE_ID.
That's it and you are DONE with the authentication problem.

But, I am still on retrieving contact info from Yahoo!.
Thanks all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top