Facebook Mobile

19
www.exponetic.com Facebook Mobile Facebook Developer’s Garage January 23 rd 2008

description

Facebook Mobile Slideshow From Kark Bunyan

Transcript of Facebook Mobile

Page 1: Facebook Mobile

www.exponetic.com

Facebook Mobile

Facebook Developer’s GarageJanuary 23rd 2008

Page 2: Facebook Mobile

www.exponetic.com

Facebook Mobile

Introduction to Facebook Mobile

• A demo application

• What can and can’t be done

• Mobile browsing and SMS messaging

• A few technical details

Page 3: Facebook Mobile

www.exponetic.com

Demo app – Secret Status

The Secret Status application• Allows the user to enter two

status messages• Allow some friends to view your

secret status• Receive updates from the

secret status changes of others

Page 4: Facebook Mobile

www.exponetic.com

Page 5: Facebook Mobile

www.exponetic.com

Demo app – Secret Status

Secret Status Mobile

Cut down functionality:

• Update your status messages

• View status messages of your friends

• A basic profile view

Page 6: Facebook Mobile

www.exponetic.com

Mobile Capabilities

Elements of Facebook Mobile

• Mobile homepage

• Mobile-specific profile

• Mobile-specific application canvas pages

• Receive SMS messages from users (on O2)

• Send SMS messages to a user

Page 7: Facebook Mobile

www.exponetic.com

Mobile Capabilities

Mobile homepage– status updates– events– cut down newsfeed– links to Facebook tasks– links to your profile

Little an app can add here

Page 8: Facebook Mobile

www.exponetic.com

Mobile Capabilities

Mobile-specific profile– XHTML content– a subset of FBML– Can contain links to the application

canvas page– Automatically served as part of the

m.facebook.com domain– Set profile markup with the updated

parameter of the setFBML API call

Page 9: Facebook Mobile

www.exponetic.com

Mobile Capabilities

Mobile-specific canvas pages– XHTML content– a subset of FBML– Can be interactive e.g. form posts– Served inside the fb:mobile tag– Rendering will depend on the

mobile device’s capabilities

Page 10: Facebook Mobile

www.exponetic.com

Technicalities

Canvas page issues• Canvas pages have identical URLs e.g.

http://apps.facebook.com/secretstatus• Canvas pages try to detect mobile device

– receive fb_sig_mobile=1 in POST

• But mobile devices pretend to benormal browsers

• As a result users may be served the “regular” site ( = x00kb download)

Page 11: Facebook Mobile

www.exponetic.com

Technicalities

Canvas page issues

• To force Facebook Mobile display– add e.g. is_mobile=1 to all links, especially from

the profile– switch output at the top of the page– output code within an fb:mobile tag

Page 12: Facebook Mobile

www.exponetic.com

TechnicalitiesIs this a mobile device?Yes

Pass fb_sig_mobile=1 through POST

No

is_mobile=1?

Application renders mobile content

Mobile devices lie at this point

Facebook decides to render mobile frame

Send surrounding fb:mobile tag

Yes

This forces mobile frame rendering

Application renders standard content

No

Facebook defaults to standard frame

Page 13: Facebook Mobile

www.exponetic.com

Technicalities

Receive SMS messages• Tick “My application uses the mobile

platform” in the app settings• On O2, send a text to 32665• Send message as: app_canvas_name

<query> • The message is posted to the app’s

index page• fb_sig_sms is set to 1 in the POST

Page 14: Facebook Mobile

www.exponetic.com

Technicalities

Send SMS messages

• User needs to have activated Facebook mobile– Enter phone number (and pretend to be on O2)– Receive an SMS confirmation code– Enter the code on Facebook

Page 15: Facebook Mobile

www.exponetic.com

Technicalities

Send SMS messages

• Needs to have given your application permission to send SMS by visiting:– http://www.facebook.com/authorize.php?

api_key=YOUR_API_KEY&v=1.0&ext_perm=sms

• Possible to query for whether permission has been given via the API

• (Signup is a poor user journey)

Page 16: Facebook Mobile

www.exponetic.com

Page 17: Facebook Mobile

www.exponetic.com

Technicalities

Send SMS messages

if($facebook->api_client->call_method('facebook.sms.canSend',array('uid' => $userID))){

try{

$facebook->api_client->call_method('facebook.sms.send',array('uid' => $userID,'message' => "Test SMS“));

}catch(FacebookRestClientException $ex){

$error[] = $ex->getMessage(); }

}

Page 18: Facebook Mobile

www.exponetic.com

Conclusions

My conclusions

• Mobile profile and canvas pages are easy to implement, if the application warrants it

• The SMS API is limited by being tied to O2

• Users have to work hard to enable SMS

• Mobile browser versions of applications are viable now, but SMS enabled apps may be better off with 3rd party gateways

Page 19: Facebook Mobile

www.exponetic.com

Facebook MobileThanks

Facebook Developer’s GarageJanuary 23rd 2008