Reputation: 3658
I want to access few social networks such as Instagram, Facebook, Twitter in my iOS app. I need to get user info, their friends etc. All this social network use OAuth 2.0 to allow my app get some data. As I understand, I need to have my own server to use its URL as redirect_uri. So the question is How to create this server? I expected there are some tutorials and ready to use samples, but I didn't find any useful links.
Upvotes: 1
Views: 690
Reputation: 8183
you don't need to have a server for redirection.
OAuth 2.0 define a special redirect_uri for installed apps.
For example, Google OAuth define two special redirect uri,
urn:ietf:wg:oauth:2.0:oob and http://localhost
The first one results in an authorization code in the title of the page, and the second one results in the authorization code sent to a http://localhost
address as part of the query string.
you can get more information from https://developers.google.com/accounts/docs/OAuth2InstalledApp
and a reference for you https://github.com/tikitikipoo/ios_oauth_twitter_and_facebook
Upvotes: 2