Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. class MyViewController: UIViewController, GPPSignInDelegate {
  2.  
  3. @IBAction func enterGooglePlusButton(sender: AnyObject) {
  4. var signin = GPPSignIn.sharedInstance()
  5. signin.shouldFetchGooglePlusUser = true
  6. signin.clientID = googlePlusClientID // This is the client id
  7. signin.scopes = [kGTLAuthScopePlusLogin]
  8. signin.delegate = self
  9. signin.authenticate()
  10. }
  11.  
  12. func finishedWithAuth(auth: GTMOAuth2Authentication!, error: NSError!) {
  13. if error == nil {
  14. Logger.write(auth)
  15. } else {
  16. Logger.write(error)
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement