Professional Documents
Culture Documents
M
People
M
People
year
years
years
Engagement
Facebook users are x more likely to spend On average, increase in spend from Facebook users
of mobile users login with Facebook. Facebook users spend more money & time than non-Facebook users.
On average, Facebook users play longer and play more sessions than other users, and spend more in game.
https://github.com/aliparr/friendsmash
http://developers.facebook.com/android/
http://developers.facebook.com/ios/
iOS Integration
Coming Soon Native Facebook support within the OS !
Facebook Login
The rst step in enabling most of Facebooks mobile functionality.
Login
Drag the FacebookSDK.framework folder from the SDK installation folder into the Frameworks section of your Project Navigator.
Drag the FacebookSDKResources.bundle le from the FacebookSDK.framework/ Resources folder into the Frameworks section of your Project Navigator.
Add the ''-lsqlite . '' SQL library to the list of build dependencies:
Create a key called FacebookAppID with a string value, and add the app ID there. Create an array key called URL types with a single array sub-item called URL Schemes. Give this a single item with your app ID prexed with fb:
Typical scenario is free & paid. You want to launch the right one... Dene urlSchemeSufx and pass into initWithAppId:urlSchemeSufx:andDelegate: method
appDelegate.session
=
[[FBSession
alloc]
initWithAppID:@"480369938658210"
permissions:permissions
urlSchemeSuffix:@"free"
tokenCacheStrategy:nil];
Modify the URL Schemes entry in plist from fbYOUR_APP_ID to fbYOUR_APP_IDYOUR_URL_SCHEME_SUFFIX and update developer app settings
Feed
Open Graph Structured content, Aggregations Appears in News Feed Scores & Achievements
Well launch your native app, if installed Otherwise, well send the user to the app store
Requests
Use cases: Invites, gifting, missions, competitions, tournaments....
Sending Receive Push Notication Light up notication jewel
Requests
Use cases: Invites, gifting, missions, competitions, tournaments....
Sending Receive Push Notication Light upin notication list Appear notication jewel
Requests
Use cases: Invites, gifting, missions, competitions, tournaments....
Receive Push Notication Cross-Platform Light up notication jewel Appear in notication list (Web / iOS / Android / Mobile Web)
Requests
Implementation is easy, lets do it!
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat: @"I just smashed %d friends! Can you beat it?", nScore], @"message", nil]; [appDelegate.facebook dialog:@"apprequests" andParams:params andDelegate:nil];
Requests
Pro Tip - Frictionless Requests
Will automatically send future requests without
prompting user
Useful for Games to send a Your Turn
Requests
Pro Tip - Customise
user experience
Native dialogs will perform better
Requests
Pro Tip - Filter
What if you dont support all platforms?
Restrict Requests only to users that support your platforms... Can query the set of devices a user has via the Graph API
GET https://graph.facebook.com/USER_ID?elds=devices
Feed
Use cases: Bragging...
1:Many Communication
Feed
Feed Dialog
Implementation is easy, lets do it!
NSMutableDictionary
*params
=
[NSMutableDictionary
dictionaryWithObjectsAndKeys:
@"Checkout
my
Friend
Smash
greatness!",
@"name",
@"Come
smash
me
back!",
@"caption",
[NSString
stringWithFormat:@"I
just
smashed
%d
friends!
Can
you
beat
my
score?",
nScore],
@"description",
@"https://young-atoll-3559.herokuapp.com/images/friendsmashlogo_small.jpg",
@"picture",
nil];
[appDelegate.facebook
dialog:@"feed"
andParams:params
andDelegate:nil];
Deep Linking
Recap - Feed & Timeline stories link
contextual experience.
Deep Linking
Implementation is easy, lets do it!
NSMutableDictionary
*params
=
[NSMutableDictionary
dictionaryWithObjectsAndKeys:
@"Checkout
my
Friend
Smash
greatness!",
@"name",
@"Come
smash
me
back!",
@"caption",
[NSString
stringWithFormat:@"I
just
smashed
%d
friends!
Can
you
beat
my
score?",
nScore],
@"description",
@"https://young-atoll-3559.herokuapp.com/images/friendsmashlogo_small.jpg",
@"picture",
[NSString
stringWithFormat:@"https://www.mydomain.com/challenge_brag_%d",
m_nPlayerFBID],
@"link",
nil];
[appDelegate.facebook
dialog:@"feed"
andParams:params
andDelegate:nil];
Publishing Scores
Publishing Scores
Implementation is easy, but there are a couple of steps...
Client Side
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: [NSString stringWithFormat:@"http://www.freeeel.com/friendsmash/og.php?score=%d&uid=%d", nScore, m_nPlayerFBID]]]; [request setHTTPMethod:@"POST"]; [[NSURLConnection alloc] initWithRequest:request delegate:nil];
Publishing Scores
Server Side
Managing Scores
Use cases: Tournaments...
Can easily delete scores, either per-user or for all users Great for weekly tournaments
Cross Platform
requests Native Facebook iOS App will launch game from Timeline and Feed
Build continuous experience...
A Continuous Experience
Kings Bubble Witch Saga
Same features on mobile as on canvas Facebook connected players sync: Progression Friends scores Purchases
App Center
Also available on Mobile Send to mobile button especially powerful
Takeaways
Facebook is a growth engine for both Android and iOS apps Getting started is simple Implement login to get distribution Effective social channels for additional distribution Requests, Feed, Open Graph Cross-platform enabled Bootstrap existing audiences
Resources
Facebook SDK 3.0 for iOS Available at: https://developers.facebook.com/ios/ Facebook SDK for Android Available at: https://developers.facebook.com/android/ Friend Smash! Available at: https://github.com/aliparr/friendsmash/ Developer documentation Available at: https://developers.facebook.com/docs/