You are on page 1of 23

Android and iOS with Facebook Platform

Jonathan Matus Manager, Product Marketing Vikas Gupta Partner Engineer

Open Source Native SDKs

https://github.com/facebook/facebook-ios-sdk

https://github.com/facebook/facebook-android-sdk/

Single Sign On (SSO) - Login without Typing

425M

Mobile Users

Email

Extended Permissions

FB

Connected to Facebook

Single Sign On (SSO) - Login without Typing

425M

Mobile Users

Email

Extended Permissions

FB

Connected to Facebook

Coding - Adding SSO to your Project

SSO Update!
Stability and Performance

Major stability improvements made in November Major Performance increases in February No more OK button** (be sure to ll out Bundle ID for iOS)

SSO Pitfalls

Not storing the user session Omitting elds in the Facebook App Settings

Lets Code - Part

Understanding Mobile Distribution


Deep Linking, Shallow Linking, Native Linking

Oh My!

Simple, right?

Desktop

Simple, right?
M-Site m.pinterest.com

Simple, right?
Facebook for iPhone Pinterest App App Store

or

Not so fast...
Facebook for iPhone Pinterest App

Not so fast...
Facebook for iPhone Pinterest App

Shallow Linking

How to enable/disable

Think about the User Experience

Native App Linking when Enabled for SSO


Click Bookmark

YES

Open Native App

Click Request

Is App Installed?

NO

Open App Store

YES

Click Feed/OG Story

Is Deep Linking Enabled

NO

Open Story URL

Explaining the rest of the elds

Multiple iOS Apps (Free/Paid)

Demo Deep Linking

Ofine Access Deprecation


Just announced Jan All apps migrated by May , Existing user tokens with ofine_access not impacted
iOS
- (void)fbDidExtendToken:(NSString*)accessToken expiresAt:(NSDate*)expiresAt { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [prefs setObject:accessToken forKey:@"accessToken"]; [prefs setObject:expiresAt forKey:@"expirationDate"]; [prefs synchronize]; }

Android
public void onResume() { super.onResume(); facebook.extendAccessTokenIfNeeded(this, null); }

Graph API Calls


[facebook requestWithGraphPath:@"me" andParams:params andDelegate:self];

[facebook requestWithGraphPath:@"me/friends" andParams:params andDelegate:self];

Using Dialogs
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"I'm using the Hackbook for iOS app", @"name", @"Hackbook for iOS.", @"caption", @"Check out Hackbook for iOS to learn how you can make your iOS apps social using Facebook Platform.", @"description", @"http://m.facebook.com/apps/hackbookios/", @"link", @"http://www.fb.me/facebook_icon_large.png", @"picture", actionLinksStr, @"actions",nil]; [facebook dialog:@"feed" andParams:params andDelegate:self];

Now What? Hack!

SDKs (include Hackbook Sample)


https://github.com/facebook/facebook-android-sdk/ https://github.com/facebook/facebook-ios-sdk

Getting Started Guides


https://developers.facebook.com/docs/mobile/android/build/ https://developers.facebook.com/docs/mobile/ios/build/

Ofine Access Deprecation


https://developers.facebook.com/docs/ofine-access-deprecation/

Best Practices (see Group)

You might also like