Last active
December 26, 2015 05:37
-
-
Save gorhack/7d8ff0c39903dd6f750e to your computer and use it in GitHub Desktop.
File additions to implement Facebook SDK with Swift 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import FBSDKShareKit | |
... | |
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { | |
return FBSDKApplicationDelegate.sharedInstance().application( | |
application, | |
openURL: url, | |
sourceApplication: sourceApplication, | |
annotation: annotation) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>CFBundleURLTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleURLSchemes</key> | |
<array> | |
<string>fb859573284156564</string> | |
</array> | |
</dict> | |
</array> | |
<key>FacebookAppID</key> | |
<string>859573284156564</string> | |
<key>FacebookDisplayName</key> | |
<string>login example</string> | |
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSExceptionDomains</key> | |
<dict> | |
<key>facebook.com</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> | |
<false/> | |
</dict> | |
<key>fbcdn.net</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> | |
<false/> | |
</dict> | |
<key>akamaihd.net</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> | |
<false/> | |
</dict> | |
</dict> | |
</dict> | |
<key>LSApplicationQueriesSchemes</key> | |
<array> | |
<string>fbapi</string> | |
<string>fb-messenger-api</string> | |
<string>fbauth2</string> | |
<string>fbshareextension</string> | |
</array> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import FBSDKLoginKit | |
... | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let loginButton = FBSDKLoginButton.init() | |
loginButton.center = self.view.center | |
self.view.addSubview(loginButton) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment