gorhack / fblogin_swift2

Basic Swift 2 application using the Facebook 4.8 SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fblogin_swift2

Basic Swift 2 application using the Facebook 4.8 SDK

###Follow the Facebook Quick Start.

  1. Don't forget to import the frameworks and select "Copy items if needed" in the Options.
  2. Copy the settings from the Facebook Quick Start into your applications's plist file.
  3. In ViewController.swift file import FBSDKLoginKit and add the following code to the viewDidLoad method:
let loginButton = FBSDKLoginButton.init()
loginButton.center = self.view.center
self.view.addSubview(loginButton)
  1. In AppDelegate.swift import FBSDKShareKit and add the following method:
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
        return FBSDKApplicationDelegate.sharedInstance().application(
            application,
            openURL: url,
            sourceApplication: sourceApplication,
            annotation: annotation)
    }

About

Basic Swift 2 application using the Facebook 4.8 SDK

License:MIT License


Languages

Language:Objective-C 98.6%Language:Swift 1.4%