tolkiana / instagram-auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

instagram-auth

This application is an example of how to use the Instagram API for authentication.

alt text alt text

InstagramService is the class that handles the authentication, implements the following functions:

    func startAuthorization(withURL url: NSURL)
    func requestAccessToken(withCode code: String)
    func logout()

Implementation of InstagramDelegate is needed to get callback from the first two functions, posible callbacks are:

    func didGetAuthorizationCode(code: String)
    func didFailAuthorizing()
    func didGetAccessToken(token: String, forUser user: User)
    func didFailGettingAccessToken()

Some of the concepts applied to build this example are:

  • Generics
  • Protocols
  • MVVM

About


Languages

Language:Swift 99.6%Language:Objective-C 0.4%