SlideShare a Scribd company logo
1 of 70
Facebook Application Development September 2009
Agenda Introduction What Works for Brands? Measuring Success Understanding the “Viral Loop” The Facebook Platform Building a Facebook Application Building a Custom Facebook Fan Page Building a Facebook Connect Web Page Reference Links
Introduction Who is this guy and why is he Shiny?
Why I Am Here Over 40 campaigns on Facebook Co-Founded FacebookCamp (Toronto) Largest Facebook Dev Garage in the world! Co-Founded Refresh Partners in May 2007 1st Marketing Agency focused on Social Networks Founded Shiny Agency in May 2009 10+ years as a marketing executive in public companies and startups 10+ years as an engineering executive (and code-monkey) in startups
Previous Facebook Campaigns
Shiny Agency We are a specialized marketing agency focused on bringing brands to social networks, where their customers are. Using our experience, proven best-practices and utilizing only our local talent, we ensure that your project/campaign is successful. Queen Street West (near Spadina Ave), Toronto
What WORKS (& WHAT DOESN’T) How to get more 1 active user (you) …
Make It Socialable !
Target Your Audience 3Cs Must Match your Target: Creative Copy Concept
Allow Users to Interact With You
Entertain the User…
… or Provide Value
It Isn’t about Your Brand Can you find                  ?
… or It is All About Your Brand 2,102,598 fans!
Keep Them Engaged (& Coming Back)
Be Different (& Unique)
Facebook Isn’t Your Microsite
(Your Graphic Designers are Gods, but) Don’t Reinvent the Look & Feel http://wiki.developers.facebook.com/index.php/DesignerNotes
Measuring Success Numbers keeps your boss happy
Vital Metrics Standard Web Analytics Pageviews, Time-on-Site, Geography Rich Demographics Gender, Age, … Viral Coefficient (k-factor) For every new user, how manyother users do they bring in?
Social Network Metrics Active Users How many users have actually engaged with your application in the last week/month? Engagement Metrics Reach and effectiveness of Newsfeeds, Notifications, Profile Boxes Referrals From Your Facebook presence to your web site
Understanding the Viral Loop This is the key
Master the Viral Loop Reach out to new users (newsfeeds/stream/profile) Bring users back often (events/notifications) Be interesting and have eye-candy (text copy & images) Insert your message everywhere (profile/newsfeed) Entice them to share your message
Social Ads are the Tip of The Viral Loop
Advertising in Other Applications
Application Directory
Your Fan Page
User’s Profile Many Touch Points ,[object Object]
Publisher
Profile Boxes
Narrow
Wide
Main
Profile Tab
Info Tab
Wall Attachments28
Notifications Based on actions that the user completes Based on what their friend’s actions Based on regular daily/weekly information updates Remind them to come back
Invitations
Newsfeeds
Newsfeeds
Facebook Platform Kind of like the web (IE6 is still a problem)
Similar, but Different Facebook Platform FBML / XFBML FQL FBJS CSS FB-API Open Standards HTML SQL JavaScript CSS
FBML Access to Facebook data <fb:nameuid="696646180" />turnsinto <a href="http://www.new.facebook.com/profile.php?id=696646180”>Roy Pereira</a> Use Facebook Design Elements <fb:tab-tem> 35
FQL SQL-like interface to access Facebook data Duplicate of API functionality Many API functions are just FQL wrappers Don’t bother…
Facebook API RESTAPI to access Facebook Most common uses are: get the User’s Friend list set Profile Boxes Send Notification Get User’s Information Lots of client libraries: PHP, Java, .NET, RoR API keeps changing… 37
API Test Tool http://developers.facebook.com/tools.php 38
FBJS Like JavaScript, except… FBJS runs in a protected sandbox Uses GETters and SETers Built-in Ajax & Animation
Building a Facebook Application Remember your first time?
Setting up The Application	 Add the Developer Application http://www.facebook.com/developers/apps.php Add an Application
Critical Configuration Fields
Finally…
Infrastructure Download the Facebook API client http://wiki.developers.facebook.com/index.php/Client_Libraries Setup your hosting server	 Facebook does not provider hosting!
Coding; Hello <user name> <?php $api_key = '7483ff2c054d8116197fbb54f1893fab'; $secret = 'e13ede6fc6eec92e4aac48e4aa586391'; $facebook = new Facebook($api_key, $secret); // Only for running on a Canvas page in an application $facebook->require_frame(); // Only for non-public Canvas pages $facebook_user_id= $facebook->require_login(); echo “<fbml>”;	// completely optional echo “Hello <fb:nameuid=$facebook_user_id/> !”; echo “</fbml>”;
Coding; Friend’s Pictures <?php $api_key = '7483ff2c054d8116197fbb54f1893fab'; $secret = 'e13ede6fc6eec92e4aac48e4aa586391'; $facebook = new Facebook($api_key, $secret); $facebook->require_frame(); $facebook_user_id = $facebook->require_login(); try { 	$friends = $facebook->api_client->friends_get(); } catch (FacebookRestClientException $ex) {} foreach($friends as $friend) 	echo “<fb:profile-picuid=$friend/>”; http://wiki.developers.facebook.com/index.php/Friends.get
Coding; Registering Newsfeeds $one_line = array('{*actor*} is going to see <a href="{*url*}">{*movie*}</a> during the <a href=”{*appurl*}">Toronto International Film Festival</a>.’); $short_story = array( 	array( 		'template_title' => '{*actor*} is going to see <a href="{*url*}">{*movie*}</a> during the <a href=”{*appurl*}">Toronto International Film Festival</a>.', 	'template_body' => 'Want to go with them?' 	) ); $full_story = array( 	array( 		'template_title' => '{*actor*} is going to see <a href="{*url*}">{*movie*}</a> during the <a href="' . APP_URL . '">Toronto International Film Festival</a>.', 	'template_body' => 'Want to go with them?’ 	) ); $action_links = array( array('text' => 'Check out the movie!', 'href' => APP_URL) ); $feed_id =$facebook->api_client->feed_registerTemplateBundle( 	$one_line, $short_story, $full_story, $action_links); http://wiki.developers.facebook.com/index.php/Feed.registerTemplateBundle
Feed Preview Console 48 http://developers.facebook.com/tools.php?feed
Coding; Sending a Newsfeed (FBJS) <script type=“text/javascript”> function send_newsfeed(feed_id, movie, url, image) { varmsg = 'Tell your friends about the TIFF app'; var body = ’The best new movies!'; vartemplate_data = { 		"url":url, 		"movie":movie, 		"images":[ 	{ 				"src":image,  				"href":”http://apps.facebook.com/torontofilmfestival/” 			} 	] 	}; Facebook.showFeedDialog(feed_id, template_data, body, '', null, msg, ''); } </script> http://wiki.developers.facebook.com/index.php/Facebook.showFeedDialog
Sending a Newsfeed
Coding; Setting the Profile Boxes $boxes = ‘<fb:wide>This is the wide box (388px wide)</fb:wide>’; $boxes .= ‘<fb:narrow>This is the narrow box (184px wide)</fb:narrow>’; $boxes .= ‘<fb:mobile>This only shows on the mobile website</fb:mobile>’; $main = ‘This is the main box on the wall tab of the profile (184px wide, 250px tall).  Very similar to the narrow box.’; $facebook->api_client->profile_setFBML( 	null, 				// deprecated $facebook_user_id,  $boxes,  null, 				// deprecated 	null,				// deprecated  $main); <fb:add-section-button section=“profile”/> http://wiki.developers.facebook.com/index.php/Profile.setFBML
Coding; Sending App Notifications $users = array(123, 456, 789); $msg = ‘Hey, come back to the application.  Please?’; $msg_type = ‘app_to_user’; try { 	$facebook->api_client->notifications_send($users, $msg, $msg_type); } catch (FacebookRestClientException $ex) {} http://wiki.developers.facebook.com/index.php/Notifications.send
Coding; Getting a User’s Information $users = array(123, 456, 789); $fields = array( 	‘uid’, 	‘name’, 	‘birthday’, 	‘sex’ ); try { 	$info = $facebook->api_client->users_getInfo($users, $fields); } catch (FacebookRestClientException $ex) {} Warning; You can only keep this information for 24 hours (Facebook ToS) http://wiki.developers.facebook.com/index.php/Users.getInfo
Coding; FBJS Ajax <script> varinput_value = document.getElementById(‘myinput’).getValue(); varajax = new Ajax(); ajax.responseType = Ajax.FBML; ajax.onerror= function(){}; ajax.ondone= function(data) { document.getElementById(‘results’).setInnerFBML(data); 	}; ajax.post(‘http://apps.shinyagency.com/tiff/ajax.php’, ‘value=‘ + escape(input_value)); </script> http://wiki.developers.facebook.com/index.php/FBJS
Important FB URL Variables fb_sig_user User ID fb_sig_profile_user Profile User ID (only available in a profile tab) fb_sig_locale User’s language (en_US) installed Equals 1 the first time that the user adds your app fb_page_id The page ID if the user is using the application on that Fan Page’s application tab http://wiki.developers.facebook.com/index.php/Your_callback_page_and_you
Building a Custom Fan Page Keep your fans on your page
Setting up the FB Application
Add the Application to the Fan Page Go to your Facebook application Click on the link besides 'Built By' at the bottom of the page   This will take you to the Fan Page of that application Click on Add to my Page (you may need to click on 'More' first) Select your Fan Page to add this app to
Coding; Support the Profile Tab <?php $api_key = '7483ff2c054d8116197fbb54f1893fab'; $secret = 'e13ede6fc6eec92e4aac48e4aa586391'; $facebook = new Facebook($api_key, $secret); $facebook_user_id= $_REQUEST[‘fb_sig_profile_user’]; if ($facebook_user_id) 	echo “Hello <fb:nameuid=$facebook_user_id/>. Thanks for the info.”; $page_id = $_REQUEST[‘fb_page_id’]; You do NOT know who the viewing user is (until they submit a form/ajax)! No auto-play JS/SWF.  No <fb:iframe> tag. Watch your <a href>; make them absolute.
Integrating Facebook Connect Make the web social
FB Connect: Setup Application
FB Connect: XFBML Create xd_receiver.htm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> 	<title>Cross-Domain Receiver Page</title> </head> <body> <script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js?2" type="text/javascript"> 	</script> </body> </html> http://wiki.developers.facebook.com/index.php/XFBML

More Related Content

What's hot

Software Testing for SEO
Software Testing for SEOSoftware Testing for SEO
Software Testing for SEOMichael King
 
Peepcode facebook-2-rails on facebook
Peepcode facebook-2-rails on facebookPeepcode facebook-2-rails on facebook
Peepcode facebook-2-rails on facebooksushilprajapati
 
Business apps for your facebook page
Business apps for your facebook pageBusiness apps for your facebook page
Business apps for your facebook pagebrendawhitfield
 
Modern SEO Players Guide
Modern SEO Players GuideModern SEO Players Guide
Modern SEO Players GuideMichael King
 
iOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsiOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsJustin Briggs
 
Flash SEO Secrets
Flash SEO SecretsFlash SEO Secrets
Flash SEO Secretsrtretola
 
wexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentationwexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentationtutorialsruby
 
Deep linking slides
Deep linking slidesDeep linking slides
Deep linking slidesPersonagraph
 
Automation Demystified
Automation DemystifiedAutomation Demystified
Automation DemystifiedMichael King
 
6 Ways to Use Google+ to Increase Your Visibility
6 Ways to Use Google+ to Increase Your Visibility6 Ways to Use Google+ to Increase Your Visibility
6 Ways to Use Google+ to Increase Your VisibilityMohamed Mahdy
 
Future of the Web with Conversational Interface
Future of the Web with Conversational InterfaceFuture of the Web with Conversational Interface
Future of the Web with Conversational InterfaceTomomi Imura
 
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...Tomomi Imura
 
Project guideline
Project guidelineProject guideline
Project guidelineAdrian Yi
 
SMX London - Tools for Pulling Rank
SMX London - Tools for Pulling RankSMX London - Tools for Pulling Rank
SMX London - Tools for Pulling RankMichael King
 

What's hot (19)

Software Testing for SEO
Software Testing for SEOSoftware Testing for SEO
Software Testing for SEO
 
Peepcode facebook-2-rails on facebook
Peepcode facebook-2-rails on facebookPeepcode facebook-2-rails on facebook
Peepcode facebook-2-rails on facebook
 
Business apps for your facebook page
Business apps for your facebook pageBusiness apps for your facebook page
Business apps for your facebook page
 
Modern SEO Players Guide
Modern SEO Players GuideModern SEO Players Guide
Modern SEO Players Guide
 
iOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsiOS & Android App Indexing & App Actions
iOS & Android App Indexing & App Actions
 
Pr7 8 clubwear-and-party-wear
Pr7 8 clubwear-and-party-wearPr7 8 clubwear-and-party-wear
Pr7 8 clubwear-and-party-wear
 
Flash SEO Secrets
Flash SEO SecretsFlash SEO Secrets
Flash SEO Secrets
 
wexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentationwexarts.org iPhone Project: Developer Documentation
wexarts.org iPhone Project: Developer Documentation
 
Deep linking slides
Deep linking slidesDeep linking slides
Deep linking slides
 
Deep linking
Deep linkingDeep linking
Deep linking
 
Automation Demystified
Automation DemystifiedAutomation Demystified
Automation Demystified
 
6 Ways to Use Google+ to Increase Your Visibility
6 Ways to Use Google+ to Increase Your Visibility6 Ways to Use Google+ to Increase Your Visibility
6 Ways to Use Google+ to Increase Your Visibility
 
Taskade review
Taskade reviewTaskade review
Taskade review
 
Future of the Web with Conversational Interface
Future of the Web with Conversational InterfaceFuture of the Web with Conversational Interface
Future of the Web with Conversational Interface
 
Resume
ResumeResume
Resume
 
Zingtabs com
Zingtabs comZingtabs com
Zingtabs com
 
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
 
Project guideline
Project guidelineProject guideline
Project guideline
 
SMX London - Tools for Pulling Rank
SMX London - Tools for Pulling RankSMX London - Tools for Pulling Rank
SMX London - Tools for Pulling Rank
 

Similar to Shiny Agency's Facebook Development Guidelines

Planning Your Progressive Web App
Planning Your Progressive Web AppPlanning Your Progressive Web App
Planning Your Progressive Web AppJason Grigsby
 
Facebook Apps Development 101 (Java)
Facebook Apps Development 101 (Java)Facebook Apps Development 101 (Java)
Facebook Apps Development 101 (Java)Damon Widjaja
 
Creating a content managed facebook app
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook appOS-Cubed, Inc.
 
Social Developers London - Facebook F8 and Twitter Developer comparison
Social Developers London - Facebook F8 and Twitter Developer comparisonSocial Developers London - Facebook F8 and Twitter Developer comparison
Social Developers London - Facebook F8 and Twitter Developer comparisonAngus Fox
 
Top 5 Tips for Building Viral Social Web Applications and Sites
Top 5 Tips for Building Viral Social Web Applications and SitesTop 5 Tips for Building Viral Social Web Applications and Sites
Top 5 Tips for Building Viral Social Web Applications and SitesJonathan LeBlanc
 
Facebook Application Experts
Facebook Application ExpertsFacebook Application Experts
Facebook Application ExpertsEdward Sattaur
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Railsjhenry
 
OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introductionh_marvin
 
Facebook Connect Integration
Facebook Connect IntegrationFacebook Connect Integration
Facebook Connect Integrationmujahidslideshare
 
diy Frontend Roadmap PPT code dose.pdf
diy Frontend Roadmap PPT code dose.pdfdiy Frontend Roadmap PPT code dose.pdf
diy Frontend Roadmap PPT code dose.pdfSteinsPeterson
 
Facebook Social Plugins
Facebook Social PluginsFacebook Social Plugins
Facebook Social PluginsAizat Faiz
 
Facebook Developer Garage Cyberjaya
Facebook Developer Garage CyberjayaFacebook Developer Garage Cyberjaya
Facebook Developer Garage CyberjayaMehedi Hasan Sumon
 
Going where they are: Developing an IM reference service & Catalog Widgets in...
Going where they are: Developing an IM reference service & Catalog Widgets in...Going where they are: Developing an IM reference service & Catalog Widgets in...
Going where they are: Developing an IM reference service & Catalog Widgets in...kramsey
 
Facebook Apps Vs Google Open Social
Facebook Apps Vs Google Open SocialFacebook Apps Vs Google Open Social
Facebook Apps Vs Google Open SocialRachel Vacek
 
Sogeti Strategic Mobile Design 2011
Sogeti Strategic Mobile Design 2011Sogeti Strategic Mobile Design 2011
Sogeti Strategic Mobile Design 2011Thomas Wesseling
 

Similar to Shiny Agency's Facebook Development Guidelines (20)

Planning Your Progressive Web App
Planning Your Progressive Web AppPlanning Your Progressive Web App
Planning Your Progressive Web App
 
Facebook Coin
Facebook CoinFacebook Coin
Facebook Coin
 
Facebook Apps Development 101 (Java)
Facebook Apps Development 101 (Java)Facebook Apps Development 101 (Java)
Facebook Apps Development 101 (Java)
 
Creating a content managed facebook app
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook app
 
Social Developers London - Facebook F8 and Twitter Developer comparison
Social Developers London - Facebook F8 and Twitter Developer comparisonSocial Developers London - Facebook F8 and Twitter Developer comparison
Social Developers London - Facebook F8 and Twitter Developer comparison
 
Facebook + Ruby
Facebook + RubyFacebook + Ruby
Facebook + Ruby
 
Top 5 Tips for Building Viral Social Web Applications and Sites
Top 5 Tips for Building Viral Social Web Applications and SitesTop 5 Tips for Building Viral Social Web Applications and Sites
Top 5 Tips for Building Viral Social Web Applications and Sites
 
Facebook Application Experts
Facebook Application ExpertsFacebook Application Experts
Facebook Application Experts
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Rails
 
OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introduction
 
Facebook Connect Integration
Facebook Connect IntegrationFacebook Connect Integration
Facebook Connect Integration
 
Facebook Coin
Facebook CoinFacebook Coin
Facebook Coin
 
Facebook Coin
Facebook CoinFacebook Coin
Facebook Coin
 
Facebook_Coin
Facebook_CoinFacebook_Coin
Facebook_Coin
 
diy Frontend Roadmap PPT code dose.pdf
diy Frontend Roadmap PPT code dose.pdfdiy Frontend Roadmap PPT code dose.pdf
diy Frontend Roadmap PPT code dose.pdf
 
Facebook Social Plugins
Facebook Social PluginsFacebook Social Plugins
Facebook Social Plugins
 
Facebook Developer Garage Cyberjaya
Facebook Developer Garage CyberjayaFacebook Developer Garage Cyberjaya
Facebook Developer Garage Cyberjaya
 
Going where they are: Developing an IM reference service & Catalog Widgets in...
Going where they are: Developing an IM reference service & Catalog Widgets in...Going where they are: Developing an IM reference service & Catalog Widgets in...
Going where they are: Developing an IM reference service & Catalog Widgets in...
 
Facebook Apps Vs Google Open Social
Facebook Apps Vs Google Open SocialFacebook Apps Vs Google Open Social
Facebook Apps Vs Google Open Social
 
Sogeti Strategic Mobile Design 2011
Sogeti Strategic Mobile Design 2011Sogeti Strategic Mobile Design 2011
Sogeti Strategic Mobile Design 2011
 

More from Roy Pereira

Shiny Ads Self-Service Advertising Platform (Publisher Setup)
Shiny Ads Self-Service Advertising Platform (Publisher Setup)Shiny Ads Self-Service Advertising Platform (Publisher Setup)
Shiny Ads Self-Service Advertising Platform (Publisher Setup)Roy Pereira
 
Facebook; Social Media For Your Organization; IT Canada conference
Facebook; Social Media For Your Organization; IT Canada conferenceFacebook; Social Media For Your Organization; IT Canada conference
Facebook; Social Media For Your Organization; IT Canada conferenceRoy Pereira
 
Facebook for Journalists @ Canadian Association of Journalists 2010
Facebook for Journalists @ Canadian Association of Journalists 2010Facebook for Journalists @ Canadian Association of Journalists 2010
Facebook for Journalists @ Canadian Association of Journalists 2010Roy Pereira
 
Dogbook Presentation at DigiDay NY
Dogbook Presentation at DigiDay NYDogbook Presentation at DigiDay NY
Dogbook Presentation at DigiDay NYRoy Pereira
 
Facebook Garage New York Introduction
Facebook Garage New York IntroductionFacebook Garage New York Introduction
Facebook Garage New York IntroductionRoy Pereira
 
FacebookCamp Toronto 4 Introduction
FacebookCamp Toronto 4 IntroductionFacebookCamp Toronto 4 Introduction
FacebookCamp Toronto 4 IntroductionRoy Pereira
 
FacebookCamp Toronto 5 Introduction
FacebookCamp Toronto 5 IntroductionFacebookCamp Toronto 5 Introduction
FacebookCamp Toronto 5 IntroductionRoy Pereira
 
Refresh Partners How To Build A Facebook App V2
Refresh Partners How To Build A Facebook App V2Refresh Partners How To Build A Facebook App V2
Refresh Partners How To Build A Facebook App V2Roy Pereira
 
FacebookCampToronto3 Introduction
FacebookCampToronto3 IntroductionFacebookCampToronto3 Introduction
FacebookCampToronto3 IntroductionRoy Pereira
 
FacebookCampMontreal Refresh Partners Keynote
FacebookCampMontreal Refresh Partners KeynoteFacebookCampMontreal Refresh Partners Keynote
FacebookCampMontreal Refresh Partners KeynoteRoy Pereira
 
FacebookCampToronto1 summary
FacebookCampToronto1 summaryFacebookCampToronto1 summary
FacebookCampToronto1 summaryRoy Pereira
 
FacebookCampToronto2 Introduction
FacebookCampToronto2 IntroductionFacebookCampToronto2 Introduction
FacebookCampToronto2 IntroductionRoy Pereira
 
Marketing your Application Inside Facebook
Marketing your Application Inside FacebookMarketing your Application Inside Facebook
Marketing your Application Inside FacebookRoy Pereira
 

More from Roy Pereira (13)

Shiny Ads Self-Service Advertising Platform (Publisher Setup)
Shiny Ads Self-Service Advertising Platform (Publisher Setup)Shiny Ads Self-Service Advertising Platform (Publisher Setup)
Shiny Ads Self-Service Advertising Platform (Publisher Setup)
 
Facebook; Social Media For Your Organization; IT Canada conference
Facebook; Social Media For Your Organization; IT Canada conferenceFacebook; Social Media For Your Organization; IT Canada conference
Facebook; Social Media For Your Organization; IT Canada conference
 
Facebook for Journalists @ Canadian Association of Journalists 2010
Facebook for Journalists @ Canadian Association of Journalists 2010Facebook for Journalists @ Canadian Association of Journalists 2010
Facebook for Journalists @ Canadian Association of Journalists 2010
 
Dogbook Presentation at DigiDay NY
Dogbook Presentation at DigiDay NYDogbook Presentation at DigiDay NY
Dogbook Presentation at DigiDay NY
 
Facebook Garage New York Introduction
Facebook Garage New York IntroductionFacebook Garage New York Introduction
Facebook Garage New York Introduction
 
FacebookCamp Toronto 4 Introduction
FacebookCamp Toronto 4 IntroductionFacebookCamp Toronto 4 Introduction
FacebookCamp Toronto 4 Introduction
 
FacebookCamp Toronto 5 Introduction
FacebookCamp Toronto 5 IntroductionFacebookCamp Toronto 5 Introduction
FacebookCamp Toronto 5 Introduction
 
Refresh Partners How To Build A Facebook App V2
Refresh Partners How To Build A Facebook App V2Refresh Partners How To Build A Facebook App V2
Refresh Partners How To Build A Facebook App V2
 
FacebookCampToronto3 Introduction
FacebookCampToronto3 IntroductionFacebookCampToronto3 Introduction
FacebookCampToronto3 Introduction
 
FacebookCampMontreal Refresh Partners Keynote
FacebookCampMontreal Refresh Partners KeynoteFacebookCampMontreal Refresh Partners Keynote
FacebookCampMontreal Refresh Partners Keynote
 
FacebookCampToronto1 summary
FacebookCampToronto1 summaryFacebookCampToronto1 summary
FacebookCampToronto1 summary
 
FacebookCampToronto2 Introduction
FacebookCampToronto2 IntroductionFacebookCampToronto2 Introduction
FacebookCampToronto2 Introduction
 
Marketing your Application Inside Facebook
Marketing your Application Inside FacebookMarketing your Application Inside Facebook
Marketing your Application Inside Facebook
 

Recently uploaded

Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingNauman Safdar
 
CROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NSCROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NSpanmisemningshen123
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...ssuserf63bd7
 
Over the Top (OTT) Market Size & Growth Outlook 2024-2030
Over the Top (OTT) Market Size & Growth Outlook 2024-2030Over the Top (OTT) Market Size & Growth Outlook 2024-2030
Over the Top (OTT) Market Size & Growth Outlook 2024-2030tarushabhavsar
 
Falcon Invoice Discounting: Tailored Financial Wings
Falcon Invoice Discounting: Tailored Financial WingsFalcon Invoice Discounting: Tailored Financial Wings
Falcon Invoice Discounting: Tailored Financial WingsFalcon Invoice Discounting
 
Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperityhemanthkumar470700
 
Arti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdfArti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdfwill854175
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxCynthia Clay
 
Falcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon investment
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizharallensay1
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...daisycvs
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecZurliaSoop
 
Buy Verified TransferWise Accounts From Seosmmearth
Buy Verified TransferWise Accounts From SeosmmearthBuy Verified TransferWise Accounts From Seosmmearth
Buy Verified TransferWise Accounts From SeosmmearthBuy Verified Binance Account
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdfTVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdfbelieveminhh
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1kcpayne
 
New 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateNew 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateCannaBusinessPlans
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptxnandhinijagan9867
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwaitdaisycvs
 

Recently uploaded (20)

Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for Viewing
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
CROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NSCROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NS
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
Over the Top (OTT) Market Size & Growth Outlook 2024-2030
Over the Top (OTT) Market Size & Growth Outlook 2024-2030Over the Top (OTT) Market Size & Growth Outlook 2024-2030
Over the Top (OTT) Market Size & Growth Outlook 2024-2030
 
Falcon Invoice Discounting: Tailored Financial Wings
Falcon Invoice Discounting: Tailored Financial WingsFalcon Invoice Discounting: Tailored Financial Wings
Falcon Invoice Discounting: Tailored Financial Wings
 
Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperity
 
Arti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdfArti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdf
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
Falcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business Potential
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
Buy Verified TransferWise Accounts From Seosmmearth
Buy Verified TransferWise Accounts From SeosmmearthBuy Verified TransferWise Accounts From Seosmmearth
Buy Verified TransferWise Accounts From Seosmmearth
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdfTVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
New 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateNew 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck Template
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
 

Shiny Agency's Facebook Development Guidelines

  • 2. Agenda Introduction What Works for Brands? Measuring Success Understanding the “Viral Loop” The Facebook Platform Building a Facebook Application Building a Custom Facebook Fan Page Building a Facebook Connect Web Page Reference Links
  • 3. Introduction Who is this guy and why is he Shiny?
  • 4. Why I Am Here Over 40 campaigns on Facebook Co-Founded FacebookCamp (Toronto) Largest Facebook Dev Garage in the world! Co-Founded Refresh Partners in May 2007 1st Marketing Agency focused on Social Networks Founded Shiny Agency in May 2009 10+ years as a marketing executive in public companies and startups 10+ years as an engineering executive (and code-monkey) in startups
  • 6. Shiny Agency We are a specialized marketing agency focused on bringing brands to social networks, where their customers are. Using our experience, proven best-practices and utilizing only our local talent, we ensure that your project/campaign is successful. Queen Street West (near Spadina Ave), Toronto
  • 7. What WORKS (& WHAT DOESN’T) How to get more 1 active user (you) …
  • 9. Target Your Audience 3Cs Must Match your Target: Creative Copy Concept
  • 10. Allow Users to Interact With You
  • 12. … or Provide Value
  • 13. It Isn’t about Your Brand Can you find ?
  • 14. … or It is All About Your Brand 2,102,598 fans!
  • 15. Keep Them Engaged (& Coming Back)
  • 16. Be Different (& Unique)
  • 18. (Your Graphic Designers are Gods, but) Don’t Reinvent the Look & Feel http://wiki.developers.facebook.com/index.php/DesignerNotes
  • 19. Measuring Success Numbers keeps your boss happy
  • 20. Vital Metrics Standard Web Analytics Pageviews, Time-on-Site, Geography Rich Demographics Gender, Age, … Viral Coefficient (k-factor) For every new user, how manyother users do they bring in?
  • 21. Social Network Metrics Active Users How many users have actually engaged with your application in the last week/month? Engagement Metrics Reach and effectiveness of Newsfeeds, Notifications, Profile Boxes Referrals From Your Facebook presence to your web site
  • 22. Understanding the Viral Loop This is the key
  • 23. Master the Viral Loop Reach out to new users (newsfeeds/stream/profile) Bring users back often (events/notifications) Be interesting and have eye-candy (text copy & images) Insert your message everywhere (profile/newsfeed) Entice them to share your message
  • 24. Social Ads are the Tip of The Viral Loop
  • 25. Advertising in Other Applications
  • 28.
  • 32. Wide
  • 33. Main
  • 37. Notifications Based on actions that the user completes Based on what their friend’s actions Based on regular daily/weekly information updates Remind them to come back
  • 41. Facebook Platform Kind of like the web (IE6 is still a problem)
  • 42. Similar, but Different Facebook Platform FBML / XFBML FQL FBJS CSS FB-API Open Standards HTML SQL JavaScript CSS
  • 43. FBML Access to Facebook data <fb:nameuid="696646180" />turnsinto <a href="http://www.new.facebook.com/profile.php?id=696646180”>Roy Pereira</a> Use Facebook Design Elements <fb:tab-tem> 35
  • 44. FQL SQL-like interface to access Facebook data Duplicate of API functionality Many API functions are just FQL wrappers Don’t bother…
  • 45. Facebook API RESTAPI to access Facebook Most common uses are: get the User’s Friend list set Profile Boxes Send Notification Get User’s Information Lots of client libraries: PHP, Java, .NET, RoR API keeps changing… 37
  • 46. API Test Tool http://developers.facebook.com/tools.php 38
  • 47. FBJS Like JavaScript, except… FBJS runs in a protected sandbox Uses GETters and SETers Built-in Ajax & Animation
  • 48. Building a Facebook Application Remember your first time?
  • 49. Setting up The Application Add the Developer Application http://www.facebook.com/developers/apps.php Add an Application
  • 52. Infrastructure Download the Facebook API client http://wiki.developers.facebook.com/index.php/Client_Libraries Setup your hosting server Facebook does not provider hosting!
  • 53. Coding; Hello <user name> <?php $api_key = '7483ff2c054d8116197fbb54f1893fab'; $secret = 'e13ede6fc6eec92e4aac48e4aa586391'; $facebook = new Facebook($api_key, $secret); // Only for running on a Canvas page in an application $facebook->require_frame(); // Only for non-public Canvas pages $facebook_user_id= $facebook->require_login(); echo “<fbml>”; // completely optional echo “Hello <fb:nameuid=$facebook_user_id/> !”; echo “</fbml>”;
  • 54. Coding; Friend’s Pictures <?php $api_key = '7483ff2c054d8116197fbb54f1893fab'; $secret = 'e13ede6fc6eec92e4aac48e4aa586391'; $facebook = new Facebook($api_key, $secret); $facebook->require_frame(); $facebook_user_id = $facebook->require_login(); try { $friends = $facebook->api_client->friends_get(); } catch (FacebookRestClientException $ex) {} foreach($friends as $friend) echo “<fb:profile-picuid=$friend/>”; http://wiki.developers.facebook.com/index.php/Friends.get
  • 55. Coding; Registering Newsfeeds $one_line = array('{*actor*} is going to see <a href="{*url*}">{*movie*}</a> during the <a href=”{*appurl*}">Toronto International Film Festival</a>.’); $short_story = array( array( 'template_title' => '{*actor*} is going to see <a href="{*url*}">{*movie*}</a> during the <a href=”{*appurl*}">Toronto International Film Festival</a>.', 'template_body' => 'Want to go with them?' ) ); $full_story = array( array( 'template_title' => '{*actor*} is going to see <a href="{*url*}">{*movie*}</a> during the <a href="' . APP_URL . '">Toronto International Film Festival</a>.', 'template_body' => 'Want to go with them?’ ) ); $action_links = array( array('text' => 'Check out the movie!', 'href' => APP_URL) ); $feed_id =$facebook->api_client->feed_registerTemplateBundle( $one_line, $short_story, $full_story, $action_links); http://wiki.developers.facebook.com/index.php/Feed.registerTemplateBundle
  • 56. Feed Preview Console 48 http://developers.facebook.com/tools.php?feed
  • 57. Coding; Sending a Newsfeed (FBJS) <script type=“text/javascript”> function send_newsfeed(feed_id, movie, url, image) { varmsg = 'Tell your friends about the TIFF app'; var body = ’The best new movies!'; vartemplate_data = { "url":url, "movie":movie, "images":[ { "src":image, "href":”http://apps.facebook.com/torontofilmfestival/” } ] }; Facebook.showFeedDialog(feed_id, template_data, body, '', null, msg, ''); } </script> http://wiki.developers.facebook.com/index.php/Facebook.showFeedDialog
  • 59. Coding; Setting the Profile Boxes $boxes = ‘<fb:wide>This is the wide box (388px wide)</fb:wide>’; $boxes .= ‘<fb:narrow>This is the narrow box (184px wide)</fb:narrow>’; $boxes .= ‘<fb:mobile>This only shows on the mobile website</fb:mobile>’; $main = ‘This is the main box on the wall tab of the profile (184px wide, 250px tall). Very similar to the narrow box.’; $facebook->api_client->profile_setFBML( null, // deprecated $facebook_user_id, $boxes, null, // deprecated null, // deprecated $main); <fb:add-section-button section=“profile”/> http://wiki.developers.facebook.com/index.php/Profile.setFBML
  • 60. Coding; Sending App Notifications $users = array(123, 456, 789); $msg = ‘Hey, come back to the application. Please?’; $msg_type = ‘app_to_user’; try { $facebook->api_client->notifications_send($users, $msg, $msg_type); } catch (FacebookRestClientException $ex) {} http://wiki.developers.facebook.com/index.php/Notifications.send
  • 61. Coding; Getting a User’s Information $users = array(123, 456, 789); $fields = array( ‘uid’, ‘name’, ‘birthday’, ‘sex’ ); try { $info = $facebook->api_client->users_getInfo($users, $fields); } catch (FacebookRestClientException $ex) {} Warning; You can only keep this information for 24 hours (Facebook ToS) http://wiki.developers.facebook.com/index.php/Users.getInfo
  • 62. Coding; FBJS Ajax <script> varinput_value = document.getElementById(‘myinput’).getValue(); varajax = new Ajax(); ajax.responseType = Ajax.FBML; ajax.onerror= function(){}; ajax.ondone= function(data) { document.getElementById(‘results’).setInnerFBML(data); }; ajax.post(‘http://apps.shinyagency.com/tiff/ajax.php’, ‘value=‘ + escape(input_value)); </script> http://wiki.developers.facebook.com/index.php/FBJS
  • 63. Important FB URL Variables fb_sig_user User ID fb_sig_profile_user Profile User ID (only available in a profile tab) fb_sig_locale User’s language (en_US) installed Equals 1 the first time that the user adds your app fb_page_id The page ID if the user is using the application on that Fan Page’s application tab http://wiki.developers.facebook.com/index.php/Your_callback_page_and_you
  • 64. Building a Custom Fan Page Keep your fans on your page
  • 65. Setting up the FB Application
  • 66. Add the Application to the Fan Page Go to your Facebook application Click on the link besides 'Built By' at the bottom of the page   This will take you to the Fan Page of that application Click on Add to my Page (you may need to click on 'More' first) Select your Fan Page to add this app to
  • 67. Coding; Support the Profile Tab <?php $api_key = '7483ff2c054d8116197fbb54f1893fab'; $secret = 'e13ede6fc6eec92e4aac48e4aa586391'; $facebook = new Facebook($api_key, $secret); $facebook_user_id= $_REQUEST[‘fb_sig_profile_user’]; if ($facebook_user_id) echo “Hello <fb:nameuid=$facebook_user_id/>. Thanks for the info.”; $page_id = $_REQUEST[‘fb_page_id’]; You do NOT know who the viewing user is (until they submit a form/ajax)! No auto-play JS/SWF. No <fb:iframe> tag. Watch your <a href>; make them absolute.
  • 68. Integrating Facebook Connect Make the web social
  • 69. FB Connect: Setup Application
  • 70. FB Connect: XFBML Create xd_receiver.htm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Cross-Domain Receiver Page</title> </head> <body> <script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js?2" type="text/javascript"> </script> </body> </html> http://wiki.developers.facebook.com/index.php/XFBML
  • 71. FB Connect: XFBML Add support for XFBML to your page Load the JS client library Initialize the client library <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"> </script> <script type="text/javascript"> FB_RequireFeatures([”Connect"], function(){ FB.init("YOUR_API_KEY_HERE", "<relative path from root>/xd_receiver.htm {"ifUserConnected":fb_connected, "ifUserNotConnected":fb_not_connected}); }); </script> http://wiki.developers.facebook.com/index.php/XFBML
  • 72. FB Connect: Login <fb:login-button onlogin=“return fb_login();“></fb:login-button> <script> function facebook_login() { FB.Connect.requireSession(function() { fb_connected(); }); } function fb_connected() { varuid = FB.Connect.get_loggedInUser(); varapi = new FB.ApiClient(api_key); api.users_getInfo([uid],['name,current_location'], function(data) { document.getElementById('uid_info').innerHTML = uid + '<br/>name: ' + data[0].name + ' from ' + data[0].current_location.city + ', ' + data[0].current_location.country + "<fb:profile-pic size=amp;quot;squareamp;quot; uid=” + uid + "></fb:profile-pic>”; }); return false; } </script>
  • 73. FB Connect: Logout <script> function fb_logout() { FB.Connect.logout(function(bool){ return true; }); } </script>
  • 75. FB Connect: Retrieving Friends <script> varapi = FB.Facebook.apiClient; api.friends_get(new Array(), function(result, exception){ // do something with result }); </script>
  • 76. Reference Links I tell you where to go…
  • 77. Links developers.facebook.com wiki.developers.facebook.com InsideFacebook.com AllFacebook.com ShinyAgency.com
  • 78. 70 Roy@ShinyAgency.com http://ShinyAgency.com