Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift 2 OAuth2 LinkedIn connection

I'm gonna make an native iOS app with Swift 2 and Xcode 7. The users should login using LinkedIn and OAuth 2 but I'm wondering how I should begin to set this up. I don't have many experience with OAuth 2.

Is there a good tutorial or a sample app? I saw the Ray Wenderlich post but that comes with an existing project. I want to build an app with LinkedIn login from scratch.

EDIT

I want to use the LinkedIn login to get the user's connections and send them notifications. I was researching this and I found some pages that said that connections can't be retrieved from the new LinkedIn API, is this true? It is not possible to get someone's connections from LinkedIn in a native iOS applications?

like image 891
Tom Spee Avatar asked Sep 21 '15 13:09

Tom Spee


2 Answers

You should start with LinkedIn guide for LinkedIn and OAuth 2 . But still if you need a sample for Authentication with OAuth 2 here it is .

For your second question related to the connection yes Linked have made changes but the API is still available but for the partners .

If you are an existing LinkedIn partner, these changes will not impact your existing partnership or the associated APIs that your partnership allows you to access.
If you are experiencing issues as a result of the May 12th changes, please reach out to your LinkedIn Business Development representative immediately.

For further details you can see Developer Program Transition Guide.

like image 167
Imran Avatar answered Nov 06 '22 22:11

Imran


Check out this repo, I did this swift pre-2.0 but it shows you the basic algorithm. You can do it the with your secret hard coded or fetch it from the server. The key is getting the oath header just right which is a huge pain https://github.com/GregPrice24/SwiftStream

like image 20
Greg Price Avatar answered Nov 06 '22 23:11

Greg Price