![]() ![]() A button named LinkedIn Sign In for initiating the sign in and authorization process.The demo app that we’re going to implement for the purposes of this tutorial is parted by two view controllers: In the first one (the default ViewController class) we’ll have three buttons only: I really believe that what we’ll do next is going to be proved quite interesting to all of you.įor your reference, here are a couple of links in the official LinkedIn documentation: With all the above being said, let’s proceed to the demo application of this tutorial, and then straight to the actual implementation. If necessary, pay a visit to a couple of other resources to get more information (like here, here, and here). Using such a valid token, we’ll be able to make authorized requests to the LinkedIn server, and depending on the app’s nature to either get or post data through the user’s profile.īefore we proceed, please make sure that you have the basic understanding on how OAuth 2.0 works, and what its flow is. The access token is what we really need when working with OAuth. We’ll exchange the authorization code with an access token.Using the above, plus some more pieces of required data, we’ll ask the LinkedIn server for an authorization code.Using a web view, we’ll let user sign in to his LinkedIn account.That will let us get two important keys ( Client ID and Client Secret) required for the rest of the process. Necessarily, we are going to create a new app in the LinkedIn Developers website.In short, here are the steps that we’ll follow in this tutorial for a successful sign in and authorization process: Regarding the OAuth 2.0 protocol there are no much to say, as the best move here would be to prompt you to read about it in the official website. That could be a problem in cases where an app requires information from the user’s LinkedIn profile, but the user doesn’t really wants to install the official app in order to sign in through the first one. In my opinion, there’s a drawback when using the LinkedIn iOS SDK: The official LinkedIn app must be installed to the device, otherwise the signing in and authorization process isn’t going to work.There are explicit steps described in LinkedIn website regarding the LinkedIn iOS SDK, so I’m not really sure if a tutorial on the same topic would make any good.I’m honestly much more attracted to such kind of tasks, where a direct “communication” with the server using REST API calls must take place until the authorization process is successful.The LinkedIn iOS SDK is also a good preference, but I prefer to stick to OAuth way for three reasons: In this tutorial, we are going to focus on the first way only, meaning that we’ll go through the necessary process that LinkedIn and OAuth 2.0 guidelines specify in order to let users sign in through an app (any app, not only iOS) and eventually authorize it for further requests. The second available option is to use the iOS SDK that LinkedIn provides, which, as every other third-party SDK, must be integrated into your project and setup up properly before making any use of it. The first one is to use the OAuth 2.0 protocol that is supported by LinkedIn. Such a social network is LinkedIn, and in this tutorial we are going to see how to authorize the app so it’s possible to exchange protected data with the server.Īuthorizing an iOS app to LinkedIn and performing certain operations based on the provided APIs can be achieved in two different ways. However, for all the other social networks, developers have to do more work so as they successfully manage to authorize their apps to each network, and perform authorized requests from there on. There are many such networks out there, with Facebook and Twitter being the most used, and additionally there is built-in support for them in iOS. ![]() In most cases, users are required to get connected somehow to each social network, and authorize the app so it makes requests on their behalf. Social networks are also part of our programming life, as the majority of the apps must interact somehow with them and send or receive data regarding users. Social networks are part of our everyday life since a long time ago. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |