Skip to content

Instantly share code, notes, and snippets.

View charlesjolley's full-sized avatar

Charles Jolley charlesjolley

View GitHub Profile
@rsms
rsms / MyAppDelegate.m
Last active February 6, 2022 20:28
Barebones example of how to use the Facebook iOS SDK for signing in with Facebook using the "best" approach available (iOS native, Facebook app SSO or Safari SSO.) Get the SDK and check out the getting-started guide at https://developers.facebook.com/ios/ and find some complete sample apps at https://github.com/facebook/facebook-ios-sdk/tree/mas…
#import <FacebookSDK/FacebookSDK.h>
@implementation MyAppDelegate
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Make sure to log "app installed". This enables you as a developer to track number of
// installs of your app. It also helps you with promoting your app through ads on Facebook
// where the number of installs can be presented dynamically as part of the ad.
// We place it here in applicationDidBecomeActive since if for some reasons the logging server
// can't be reached the first time the app is launched, we will make a new attempt the next