Facebook Mobile
-
Upload
amber156 -
Category
Technology
-
view
48.563 -
download
0
description
Transcript of Facebook Mobile
www.exponetic.com
Facebook Mobile
Facebook Developer’s GarageJanuary 23rd 2008
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
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
www.exponetic.com
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
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
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
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
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
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)
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
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
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
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
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)
www.exponetic.com
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(); }
}
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
www.exponetic.com
Facebook MobileThanks
Facebook Developer’s GarageJanuary 23rd 2008