Now, we'll use Social.framework
to integrate Instagram into our application.
For Instagram integration, we will continue with the preceding project. Open the project and redesign the storyboard. Add another button after Facebook, Twitter, and LinkedIn. Drag one more view controller from the inspector element and drop it onto the canvas. Design the new view according to the following screenshot. Drag two buttons from the interface builder and name them Login and Logout respectively.
Add a new file class in our project and name it
InstagramLoginViewController
. Make this class the owner of the newly created view controller. Then, link the button to this class as the action methodNow, we have to register our app to the Instagram Developers site as we did in previous integrations. Go to http://instagram.com/developer/register/ and register your app.
After a successful registration, Instagram will give you a client ID; save it somewhere, as we...