With the integration of Facebook on operating system level in iOS 6, there are multiple ways of allowing users to share stuff from within an app. Supporting iOS 5 and iOS 6 can get pretty complex. This presentation provides a high-level overview of how things work in the various scenarios. Get in touch with Ralf at http://twitter.com/ralf or on ADN.
3. A confusing landscape
Speaking of a fragmented environment...
Version 5.x of the iOS operating system knows nothing about Facebook.
Version 6.x introduces an operating system level integration with Facebook.
Behavior also depends on the native Facebook application being available on a
device, or not.
These varying scenarios are partially abstracted by the Facebook SDK for iOS – but
not completely.
grandcentrix GmbH 3
5. Scenario 1: The ideal setup
iOS 6 with Facebook connected on OS level
In this scenario
‣ The Facebook SDK will authenticate the user using an OS level system dialog.
‣ Absolutely no app switching will occur, everything will happen smoothly inside
your app.
‣ Sharing will leverage Apple’s system level share UI.
‣ The native Facebook app is not required. If it’s there, it simply gets ignored.
This configuration arguably delivers the best overall user experience.
Developers don’t have to write any UI related code. The Facebook SDK handles
everything automatically.
grandcentrix GmbH 5
6. Scenario 2: The very popular setup
iOS 6 with Facebook not connected on OS level and the Facebook app installed
In this scenario
‣ The Facebook SDK will authenticate the user by switching to the native
Facebook app, asking the user to confirm and switching back.
‣ Trying to share using Apple’s system level share UI will silently fail and the
developer can react to this in a couple of ways:
‣ Force Apple’s system level share UI in which case the user is asked to
connect her Facebook account on iOS level.
‣ Use the Facebook SDK to pop up the Facebook Feed Dialog in an in-app Web
View.
‣ Provide her own user interface. A pretty solid clone of Apple’s system level
share UI is available here: https://github.com/sakrist/FacebookSample.
While the Facebook SDK provides means to detect this situation, handling it
appropriately is completely up to the developer.
grandcentrix GmbH 6
7. Scenario 3: Nothing configured. Nothing installed.
iOS 6 with Facebook not connected on OS level and the Facebook app not installed
In this scenario
‣ The Facebook SDK will authenticate the user by switching to Mobile Safari,
asking the user to log into Facebook, confirm and switching back.
From here on onwards, Scenario 2 applies.
grandcentrix GmbH 7
9. Scenario 4: The very popular setup
iOS 5 with Facebook and the Facebook app installed
In this scenario
‣ The Facebook SDK will authenticate the user by switching to the native
Facebook app, asking the user to confirm and switching back.
‣ For sharing, the developer has two alternatives:
‣ Use the Facebook SDK to pop up the Facebook Feed Dialog in an in-app Web
View.
‣ Provide her own user interface. A pretty solid clone of Apple’s iOS 6 sharing
UI is available here: https://github.com/sakrist/FacebookSample.
grandcentrix GmbH 9
10. Scenario 5: No Facebook app
iOS 5 and the Facebook app not installed
In this scenario
‣ The Facebook SDK will authenticate the user by switching to Mobile Safari,
asking the user to log into Facebook, confirm and switching back.
From here on onwards, Scenario 4 applies.
grandcentrix GmbH 10
11. Ralf Rottmann
ralf.rottmann@grandcentrix.net
p. +49 221 677 860 20
t. @ralf
f. http://www.facebook.com/grandcentrix
grandcentrix GmbH
Schanzenstraße 6-20
D-51063 Cologne
Do not duplicate, publish, modify or otherwise distribute the material in this presentation unless specifically authorized by grandcentrix GmbH to do so.