SlideShare une entreprise Scribd logo
how many of these 10
            travel sites do you use?

            multiple usernames,
            passwords, confirmation
            emails, etc.

            different systems and
            formats

            10 of 10,000+ travel
            sites worldwide.
6/26/2009                     Page 2
B2B     3rd Party Apps
Reservation                              & Partners
                Unlocks,
Info locked
              Aggregates &
 in 10,000+
               Structures
  websites
               Travel Data
                                B2C Website
              Our ‘blackbox’
               TripBuilder ®
                  (Key IP)




6/26/2009                                 Page 3
on traxo.com, friends can:

   • share travel plans

   • seek travel advice

   • see travel matches

           . . . automatically
Why Facebook Connect?

• travel is social

• fb becoming de facto
identity standard

• unprecedented
distribution

• close to seamless social
graph portability
2009 fbFund Finalist
More on Layouts
          facebook_init.ctp
•   Included by Other Layouts (default.ctp)
•   Inserted Near the Footer
Integration Points – Connect Site
•   Connect Button
•   Facebook Icon
•   Profile Pictures
•   Invite Friends
•   Publish Actions
Integration Points - Facebook.com
•   App Canvas
•   Feed / Stream
•   Profile
•   Tabs
Configuring Your Application
• From your Facebook Developer Account
• API Key, App Secret, App ID
• Connect URL
  – http://example.com/
• Canvas URL
  – http://apps.facebook.com/yourappname/
Configuring Your Application
• Canvas Callback URL
  – http://example.com/connect/
• Post-Authorize Callback URL
  – http://example.com/connect/app_authorize
• Post-Remove Callback URL
  – http://example.com/connect/app_remove
CakePHP Application Structure
• app_controller.php
• config/bootstrap.php
• models/facebook.php
• controllers/connect_controller.php
• views/connect/
• views/layouts/
   – facebook.ctp
   – facebook_init.ctp
   – facebook_loader.ctp
• vendors/facebook
Installing Facebook PHP Libary
• app/vendors
• svn co URL facebook
• app/vendors/facebook
   – facebook.php
   – facebookapi_php5_restlib.php
   – jsonwrapper/



        http://wiki.developers.facebook.com/index.php/PHP

  URL: http://svn.facebook.com/svnroot/platform/clients/php/trunk
Facebook-Specific Layouts
•   app/views/layouts
     –   facebook.ctp (Canvas Layout)
     –   facebook_init.ctp
     –   facbook_loader.ctp
     –   CSS/JS
           •   Use <link rel=”src”>
           •   Append a Version Number
Configuring the Cake Install
• app/config/bootstrap.php
• Add Define statements:
   – FB_APP_ON
   – FB_APP_NAME
   – FB_APP_URLNAME
   – FB_APP_ID
   – FB_APP_SECRET
   – FB_API_KEY
   – FB_BUNDLE_ID_GENERIC
Local Database Tables
•   Map FB_UID to Local User Accounts
•   FB_id BIGINT
•   (Optional) Session_key VARCHAR(140)
•   Review Facebook Connect TOS for Storable
    Parameters.
xd_receiver.php
•    app/webroot/xd_receiver.php
•    http://example.com/xd_receiver.php
•    Use PHP to Handle SSL Switching
<php if ( $SSL ) { ?>
<script src="https://www.connect.facebook.com/js/api_lib/v0.4/
      XdCommReceiver.js" type="text/javascript"></script>
<?php }else{ ?>
<script src="http://static.ak.connect.facebook.com/js/api_lib/
      v0.4/XdCommReceiver.js" type="text/javascript"></script>
<?php } ?>
app_controller.php
•   Parent Controller for All App Controllers
•   beforeFilter()
     –   User login/logout status probably set here
     –   Great place to check for Facebook users
     –   Called before every controller action
     –   Calls to
           •   facebookInit()
           •   facebookAuth()
app_controller.php
• Protected function facebookInit() {

App::import('Vendor', 'facebook/facebook');
$fb = new Facebook( FB_API_KEY, FB_APP_SECRET );

if ($loggedInFacebookId = $fb->get_loggedin_user()){
$this->loggedInFacebookId = $loggedInFacebookId;
$this->set("loggedInFacebookId", $loggedInFacebookId);

if ($fb->api_client->users_isAppUser($loggedInFacebookId)
   || $fb->api_client->added){
   $this->isFacebookAppUser = true;
} } }
app_controller.php
• Protected function facebookAuth() {

if (!FB_APP_ON) {
return true;
}

if ($loggedInFacebookId) {
    // check for local mapping against FB user
    // if found, log them in with native methods
}
Connect Controller
•   Central Location For All Facebook
    Connect Actions
•   Some Actions Will Be Receivers For
    Facebook POST'd Responses
•   Could Be Expanded To Other Services
Connect Controller
•   connect/app_authorize
•   connect/app_remove
•   connect/app_disconnect
•   connect/new_user
•   connect/existing_user
•   connect/connected
•   connect/canvas
•   connect/invite_friends
•   connect/invite
•   connect/post_invite
app_authorize
•       User Connects on Your Site
•       Post-Authorize Callback URL
•       Capture and Store FB_UID
•       No User Interface



     http://wiki.developers.facebook.com/index.php/Account_Linking
    http://wiki.developers.facebook.com/index.php/Post-Authorize_URL
app_remove
•      User Removes Your App From Within
       Facebook
•      Post-Remove Callback URL
•      Delete Local Mapping Records
•      No User Interface
•      New Feature: Account Reclamation

    http://wiki.developers.facebook.com/index.php/Post-Remove_URL
app_disconnect
•   Triggered by User Action on Your Site
•   Same as User Removing Your Application
    From Within Facebook.
•   Post-Remove Callback URL
•   No User Interface
•   Optional, But Recommended
    $fb->api_client->
    auth_revokeAuthorization($fb_uid)
registerUsers / unregisterUsers
•       Creates / Removes Associations For
        Existing User Accounts
•       Called in Batches Initially / Periodically
•       Called For Each New User
•       No User Interface
$fb->api_client->
     connect_registerUsers(json_encode($accounts));
$fb->api_client-
     >connect_unregisterUsers(json_encode($accounts));

    http://wiki.developers.facebook.com/index.php/Connect.registerUsers
new_user / existing_user
•   Users That Already Have Local Accounts
    Can Enter Their Credentials
•   On Submit
     –   Existing User Accounts Mapped to Current
         FB_UID and Logged In
     –   New Account Created and Mapped to
         Current FB_UID
     –   connect_registerUsers Function is Called
         With Hash of Email Address
new_user / existing_user
connected
canvas
•   apps.facebook.com/yourappname
•   app/views/connect/canvas.ctp
     –   Implements a Custom Cake Layout for
         Facebook
canvas
invite_friends
•       Facebook UI for Inviting Friends (FBML)
          –    fb:request-form
          –    fb:multi-friend-selector
•       Could Use Javascript / FBJS
          –    FB.Connect.inviteConnectUsers
•       fb:request-form Action
          –    connect/post_invite.php

    http://wiki.developers.facebook.com/index.php/Account_Linking
invite_friends
// set the destination url for the invitation.
$next = $this->Link->
   url('/connect/invite?id='.$local_user_id);
$this->set("app_add_url", $fb->get_add_url($next));

// Retrieve array of friends who've already authorized the
   app.
$fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM
   friend WHERE uid1='.$this->loggedInFacebookId.') AND
   is_app_user = 1';
try {
$_friends = $fb->api_client->fql_query($fql);
}
catch ( Exception $exception ) { }
invite_friends
<fb:serverfbml style=”width:100%;”> <fb:fbml>
<fb:request-form
action="<?php echo $link->url('connect/post_invite')?>"
...
content="Traxo connects travelers! Share your trips and see
   where your friends are traveling. <?php echo
   htmlentities("<fb:req-choice url="$app_add_url"
   label="Join Traxo"") ?>" >
<fb:multi-friend-selector
...
exclude_ids="<?php echo $friends; ?>" />
</fb:request-form>
</fb:fbml> </fb:serverfbml>
invite_friends
post_invite
•   Called After User Selects and Submits
    invite_friends
•   Facebook POSTs Array of Invited
    Facebook UIDs
•   “Action” Parameter of invite_friends
    fb:request-form
•   No User Interface
invite
•   Destination Handler for Friend Invites
•   Application Specific
•   Facebook Will POST to this URL With Any
    Parameters Specified from invite_friends
•   No User Interface
Questions?




         ...Launching this Summer
More on Layouts
                     facebook.ctp
   •     Used for Any View to be Rendered Within
         Facebook(.com)
   •     Stylesheets and Javascript
           –    Cached Heavily (and Permanently)
           –    Use <link rel=”src”> with version number
           –    Limited tags
           –    Parsed by Facebook Server
       http://wiki.developers.facebook.com/index.php/Include_files
http://wiki.developers.facebook.com/index.php/Including_Stylesheets_From_PHP
More on Layouts
                  facebook_init.ctp
   •     Included by Other Layouts (default.ctp)
   •     Inserted Near the Footer
FB_RequireFeatures(["XFBML"], function() {
  FB.Facebook.init("<?php echo FB_API_KEY; ?>", "/xd_receiver.php");
  FB.Facebook.get_sessionWaitable().waitUntilReady(function(session)
{
    var is_now_logged_into_facebook = session ? true : false;
      if (is_now_logged_into_facebook != already_logged_into_facebook)
{
        FB.Connect.ifUserConnected(fb_onlogin_ready);
      }
    FB.XFBML.Host.parseDomTree();
  });
});
More on Layouts
            facebook_loader.ctp
•    Included by Other Layouts (default.ctp)
•    Inserted Near the Head Tag
<?php if ( $SSL ){ ?>
<script type="text/javascript"
      src="https://www.connect.facebook.com/js/api_lib/
      v0.4/FeatureLoader.js.php"></script>
<?php }else{ ?>
<script type="text/javascript"
      src="http://static.ak.connect.facebook.com/js/api_lib/
      v0.4/FeatureLoader.js.php"></script>
<?php } ?>

Contenu connexe

Tendances

Developers and Designers: Make Your Website Visible In Search Engines
Developers and Designers: Make Your Website Visible In Search EnginesDevelopers and Designers: Make Your Website Visible In Search Engines
Developers and Designers: Make Your Website Visible In Search EnginesBeansBox Studio
 
7 fresh free downloadable design resources
7 fresh free downloadable design resources7 fresh free downloadable design resources
7 fresh free downloadable design resourcesDennis Michels
 
Rest experience-report
Rest experience-reportRest experience-report
Rest experience-reportJim Barritt
 
Social Design - ProSEO
Social Design - ProSEOSocial Design - ProSEO
Social Design - ProSEOMat Clayton
 
Ruby on rails, php expert
Ruby on rails, php expertRuby on rails, php expert
Ruby on rails, php expertrajgoyal
 
Building an interactive timeline from facebook photos
Building an interactive timeline from facebook photosBuilding an interactive timeline from facebook photos
Building an interactive timeline from facebook photosRakesh Rajan
 
Extreme Web Productivity with Spring Roo
Extreme Web Productivity with Spring RooExtreme Web Productivity with Spring Roo
Extreme Web Productivity with Spring RooStefan Schmidt
 
SEO Crash Course: Website Rebuild
SEO Crash Course: Website RebuildSEO Crash Course: Website Rebuild
SEO Crash Course: Website RebuildStoney deGeyter
 

Tendances (9)

Developers and Designers: Make Your Website Visible In Search Engines
Developers and Designers: Make Your Website Visible In Search EnginesDevelopers and Designers: Make Your Website Visible In Search Engines
Developers and Designers: Make Your Website Visible In Search Engines
 
7 fresh free downloadable design resources
7 fresh free downloadable design resources7 fresh free downloadable design resources
7 fresh free downloadable design resources
 
Rest experience-report
Rest experience-reportRest experience-report
Rest experience-report
 
Social Design - ProSEO
Social Design - ProSEOSocial Design - ProSEO
Social Design - ProSEO
 
Ruby on rails, php expert
Ruby on rails, php expertRuby on rails, php expert
Ruby on rails, php expert
 
Building an interactive timeline from facebook photos
Building an interactive timeline from facebook photosBuilding an interactive timeline from facebook photos
Building an interactive timeline from facebook photos
 
Extreme Web Productivity with Spring Roo
Extreme Web Productivity with Spring RooExtreme Web Productivity with Spring Roo
Extreme Web Productivity with Spring Roo
 
SEO Crash Course: Website Rebuild
SEO Crash Course: Website RebuildSEO Crash Course: Website Rebuild
SEO Crash Course: Website Rebuild
 
Resume
ResumeResume
Resume
 

En vedette

INTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZ
INTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZINTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZ
INTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZRodrigo Rofdriguez
 
Academic CV Jodi L Mathieu
Academic CV Jodi L MathieuAcademic CV Jodi L Mathieu
Academic CV Jodi L MathieuJodi Mathieu
 
Tipografia
TipografiaTipografia
TipografiaESPOL
 
MHS-Rads-Specification-Guide_JUNE-2015
MHS-Rads-Specification-Guide_JUNE-2015MHS-Rads-Specification-Guide_JUNE-2015
MHS-Rads-Specification-Guide_JUNE-2015Daniel Davis
 
Askozia und peoplefone - Webinar 2016, deutsch
Askozia und peoplefone - Webinar 2016, deutschAskozia und peoplefone - Webinar 2016, deutsch
Askozia und peoplefone - Webinar 2016, deutschAskozia
 
Ag nr. 8477 q cells monokristallin (1)
Ag nr. 8477 q cells monokristallin (1)Ag nr. 8477 q cells monokristallin (1)
Ag nr. 8477 q cells monokristallin (1)Ali Çetingül
 
How to improve your email productivity to be more effective at work
How to improve your email productivity to be more effective at workHow to improve your email productivity to be more effective at work
How to improve your email productivity to be more effective at workgmbudafonyhu
 
Adwords Seminar 3: PLAs - How to do and Optimise
Adwords Seminar 3: PLAs - How to do and OptimiseAdwords Seminar 3: PLAs - How to do and Optimise
Adwords Seminar 3: PLAs - How to do and Optimiseindiumonline
 
Tutorial de uso de Autentico Chalk Paint
Tutorial de uso de Autentico Chalk PaintTutorial de uso de Autentico Chalk Paint
Tutorial de uso de Autentico Chalk PaintArteSano
 
Roi email marketing - presentacion.ppt web - gastón zarlenga - go plus
Roi   email marketing - presentacion.ppt web - gastón zarlenga - go plusRoi   email marketing - presentacion.ppt web - gastón zarlenga - go plus
Roi email marketing - presentacion.ppt web - gastón zarlenga - go plusDoppler
 
Regalos VIP 2013 - Fin de año
Regalos VIP 2013 - Fin de añoRegalos VIP 2013 - Fin de año
Regalos VIP 2013 - Fin de añoRegalos Vip
 

En vedette (20)

Trish dillon 4.5
Trish dillon 4.5Trish dillon 4.5
Trish dillon 4.5
 
Is.triptico.6.329474
Is.triptico.6.329474Is.triptico.6.329474
Is.triptico.6.329474
 
Mobicules iPhone profile
Mobicules iPhone profileMobicules iPhone profile
Mobicules iPhone profile
 
INTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZ
INTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZINTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZ
INTRODUCCIÓN A LA ECONOMÍA RODERICK RODRIGUEZ
 
Academic CV Jodi L Mathieu
Academic CV Jodi L MathieuAcademic CV Jodi L Mathieu
Academic CV Jodi L Mathieu
 
Tipografia
TipografiaTipografia
Tipografia
 
MHS-Rads-Specification-Guide_JUNE-2015
MHS-Rads-Specification-Guide_JUNE-2015MHS-Rads-Specification-Guide_JUNE-2015
MHS-Rads-Specification-Guide_JUNE-2015
 
Los geto dacios
Los geto daciosLos geto dacios
Los geto dacios
 
Askozia und peoplefone - Webinar 2016, deutsch
Askozia und peoplefone - Webinar 2016, deutschAskozia und peoplefone - Webinar 2016, deutsch
Askozia und peoplefone - Webinar 2016, deutsch
 
DKK 105
DKK 105DKK 105
DKK 105
 
Ag nr. 8477 q cells monokristallin (1)
Ag nr. 8477 q cells monokristallin (1)Ag nr. 8477 q cells monokristallin (1)
Ag nr. 8477 q cells monokristallin (1)
 
Problemario av
Problemario avProblemario av
Problemario av
 
Komplexe Zahlen
Komplexe ZahlenKomplexe Zahlen
Komplexe Zahlen
 
How to improve your email productivity to be more effective at work
How to improve your email productivity to be more effective at workHow to improve your email productivity to be more effective at work
How to improve your email productivity to be more effective at work
 
Adwords Seminar 3: PLAs - How to do and Optimise
Adwords Seminar 3: PLAs - How to do and OptimiseAdwords Seminar 3: PLAs - How to do and Optimise
Adwords Seminar 3: PLAs - How to do and Optimise
 
Trastornos de ee
Trastornos de eeTrastornos de ee
Trastornos de ee
 
Folleto CAN Completo
Folleto CAN CompletoFolleto CAN Completo
Folleto CAN Completo
 
Tutorial de uso de Autentico Chalk Paint
Tutorial de uso de Autentico Chalk PaintTutorial de uso de Autentico Chalk Paint
Tutorial de uso de Autentico Chalk Paint
 
Roi email marketing - presentacion.ppt web - gastón zarlenga - go plus
Roi   email marketing - presentacion.ppt web - gastón zarlenga - go plusRoi   email marketing - presentacion.ppt web - gastón zarlenga - go plus
Roi email marketing - presentacion.ppt web - gastón zarlenga - go plus
 
Regalos VIP 2013 - Fin de año
Regalos VIP 2013 - Fin de añoRegalos VIP 2013 - Fin de año
Regalos VIP 2013 - Fin de año
 

Similaire à Traxo Presentation - Facebook Garage Dallas 09

Leveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook AppsLeveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook AppsDavid Keener
 
Facebook Connect Integration
Facebook Connect IntegrationFacebook Connect Integration
Facebook Connect Integrationmujahidslideshare
 
MozCon Seattle 2011 - Social Design
MozCon Seattle 2011 - Social DesignMozCon Seattle 2011 - Social Design
MozCon Seattle 2011 - Social DesignMat Clayton
 
Building Facebook Apps
Building Facebook AppsBuilding Facebook Apps
Building Facebook AppsDavid Keener
 
Php day 2011 - Interactive-with-facebook
Php day 2011 - Interactive-with-facebookPhp day 2011 - Interactive-with-facebook
Php day 2011 - Interactive-with-facebookQuang Anh Le
 
funP 開發者俱樂部 十月份聚會
funP 開發者俱樂部 十月份聚會funP 開發者俱樂部 十月份聚會
funP 開發者俱樂部 十月份聚會tutchiio
 
Build Location Based App on bada
Build Location Based App on badaBuild Location Based App on bada
Build Location Based App on badaCheng Luo
 
Interactive with-facebook
Interactive with-facebookInteractive with-facebook
Interactive with-facebookTien Nguyen
 
funP 麻吉 開發者俱樂部十月份聚會
funP 麻吉 開發者俱樂部十月份聚會funP 麻吉 開發者俱樂部十月份聚會
funP 麻吉 開發者俱樂部十月份聚會Nathan Chiu
 
Intro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought LabsIntro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought LabsJohn Maver
 
Connect with Facebook to Rails Application By Nyros Developer
Connect with Facebook to Rails Application By Nyros DeveloperConnect with Facebook to Rails Application By Nyros Developer
Connect with Facebook to Rails Application By Nyros DeveloperNyros Technologies
 
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.
 
Google App Engine and Social Apps
Google App Engine and Social AppsGoogle App Engine and Social Apps
Google App Engine and Social AppsChris Schalk
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013Kiril Iliev
 
Facebook Platform for Developers
Facebook Platform for DevelopersFacebook Platform for Developers
Facebook Platform for DevelopersLidan Hifi
 
Facebook für PHP Entwickler - phpugffm
Facebook für PHP Entwickler - phpugffmFacebook für PHP Entwickler - phpugffm
Facebook für PHP Entwickler - phpugffmStephan Hochdörfer
 
Fb request form guide
Fb request form guideFb request form guide
Fb request form guidetamirc
 

Similaire à Traxo Presentation - Facebook Garage Dallas 09 (20)

Leveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook AppsLeveraging Rails to Build Facebook Apps
Leveraging Rails to Build Facebook Apps
 
Facebook Connect Integration
Facebook Connect IntegrationFacebook Connect Integration
Facebook Connect Integration
 
MozCon Seattle 2011 - Social Design
MozCon Seattle 2011 - Social DesignMozCon Seattle 2011 - Social Design
MozCon Seattle 2011 - Social Design
 
Building Facebook Apps
Building Facebook AppsBuilding Facebook Apps
Building Facebook Apps
 
Facebook Connect
Facebook ConnectFacebook Connect
Facebook Connect
 
Php day 2011 - Interactive-with-facebook
Php day 2011 - Interactive-with-facebookPhp day 2011 - Interactive-with-facebook
Php day 2011 - Interactive-with-facebook
 
funP 開發者俱樂部 十月份聚會
funP 開發者俱樂部 十月份聚會funP 開發者俱樂部 十月份聚會
funP 開發者俱樂部 十月份聚會
 
Build Location Based App on bada
Build Location Based App on badaBuild Location Based App on bada
Build Location Based App on bada
 
Interactive with-facebook
Interactive with-facebookInteractive with-facebook
Interactive with-facebook
 
funP 麻吉 開發者俱樂部十月份聚會
funP 麻吉 開發者俱樂部十月份聚會funP 麻吉 開發者俱樂部十月份聚會
funP 麻吉 開發者俱樂部十月份聚會
 
Intro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought LabsIntro To Bebo Applications by Thought Labs
Intro To Bebo Applications by Thought Labs
 
Connect with Facebook to Rails Application By Nyros Developer
Connect with Facebook to Rails Application By Nyros DeveloperConnect with Facebook to Rails Application By Nyros Developer
Connect with Facebook to Rails Application By Nyros Developer
 
The social media developer
The social media developer The social media developer
The social media developer
 
Creating a content managed facebook app
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook app
 
Google App Engine and Social Apps
Google App Engine and Social AppsGoogle App Engine and Social Apps
Google App Engine and Social Apps
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
Facebook Platform for Developers
Facebook Platform for DevelopersFacebook Platform for Developers
Facebook Platform for Developers
 
Jsf 2.0 in depth
Jsf 2.0 in depthJsf 2.0 in depth
Jsf 2.0 in depth
 
Facebook für PHP Entwickler - phpugffm
Facebook für PHP Entwickler - phpugffmFacebook für PHP Entwickler - phpugffm
Facebook für PHP Entwickler - phpugffm
 
Fb request form guide
Fb request form guideFb request form guide
Fb request form guide
 

Dernier

Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKUXDXConf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 

Dernier (20)

Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 

Traxo Presentation - Facebook Garage Dallas 09

  • 1.
  • 2. how many of these 10 travel sites do you use? multiple usernames, passwords, confirmation emails, etc. different systems and formats 10 of 10,000+ travel sites worldwide. 6/26/2009 Page 2
  • 3. B2B 3rd Party Apps Reservation & Partners Unlocks, Info locked Aggregates & in 10,000+ Structures websites Travel Data B2C Website Our ‘blackbox’ TripBuilder ® (Key IP) 6/26/2009 Page 3
  • 4. on traxo.com, friends can: • share travel plans • seek travel advice • see travel matches . . . automatically
  • 5. Why Facebook Connect? • travel is social • fb becoming de facto identity standard • unprecedented distribution • close to seamless social graph portability
  • 7. More on Layouts facebook_init.ctp • Included by Other Layouts (default.ctp) • Inserted Near the Footer
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Integration Points – Connect Site • Connect Button • Facebook Icon • Profile Pictures • Invite Friends • Publish Actions
  • 15. Integration Points - Facebook.com • App Canvas • Feed / Stream • Profile • Tabs
  • 16. Configuring Your Application • From your Facebook Developer Account • API Key, App Secret, App ID • Connect URL – http://example.com/ • Canvas URL – http://apps.facebook.com/yourappname/
  • 17. Configuring Your Application • Canvas Callback URL – http://example.com/connect/ • Post-Authorize Callback URL – http://example.com/connect/app_authorize • Post-Remove Callback URL – http://example.com/connect/app_remove
  • 18. CakePHP Application Structure • app_controller.php • config/bootstrap.php • models/facebook.php • controllers/connect_controller.php • views/connect/ • views/layouts/ – facebook.ctp – facebook_init.ctp – facebook_loader.ctp • vendors/facebook
  • 19. Installing Facebook PHP Libary • app/vendors • svn co URL facebook • app/vendors/facebook – facebook.php – facebookapi_php5_restlib.php – jsonwrapper/ http://wiki.developers.facebook.com/index.php/PHP URL: http://svn.facebook.com/svnroot/platform/clients/php/trunk
  • 20. Facebook-Specific Layouts • app/views/layouts – facebook.ctp (Canvas Layout) – facebook_init.ctp – facbook_loader.ctp – CSS/JS • Use <link rel=”src”> • Append a Version Number
  • 21. Configuring the Cake Install • app/config/bootstrap.php • Add Define statements: – FB_APP_ON – FB_APP_NAME – FB_APP_URLNAME – FB_APP_ID – FB_APP_SECRET – FB_API_KEY – FB_BUNDLE_ID_GENERIC
  • 22. Local Database Tables • Map FB_UID to Local User Accounts • FB_id BIGINT • (Optional) Session_key VARCHAR(140) • Review Facebook Connect TOS for Storable Parameters.
  • 23. xd_receiver.php • app/webroot/xd_receiver.php • http://example.com/xd_receiver.php • Use PHP to Handle SSL Switching <php if ( $SSL ) { ?> <script src="https://www.connect.facebook.com/js/api_lib/v0.4/ XdCommReceiver.js" type="text/javascript"></script> <?php }else{ ?> <script src="http://static.ak.connect.facebook.com/js/api_lib/ v0.4/XdCommReceiver.js" type="text/javascript"></script> <?php } ?>
  • 24. app_controller.php • Parent Controller for All App Controllers • beforeFilter() – User login/logout status probably set here – Great place to check for Facebook users – Called before every controller action – Calls to • facebookInit() • facebookAuth()
  • 25. app_controller.php • Protected function facebookInit() { App::import('Vendor', 'facebook/facebook'); $fb = new Facebook( FB_API_KEY, FB_APP_SECRET ); if ($loggedInFacebookId = $fb->get_loggedin_user()){ $this->loggedInFacebookId = $loggedInFacebookId; $this->set("loggedInFacebookId", $loggedInFacebookId); if ($fb->api_client->users_isAppUser($loggedInFacebookId) || $fb->api_client->added){ $this->isFacebookAppUser = true; } } }
  • 26. app_controller.php • Protected function facebookAuth() { if (!FB_APP_ON) { return true; } if ($loggedInFacebookId) { // check for local mapping against FB user // if found, log them in with native methods }
  • 27. Connect Controller • Central Location For All Facebook Connect Actions • Some Actions Will Be Receivers For Facebook POST'd Responses • Could Be Expanded To Other Services
  • 28. Connect Controller • connect/app_authorize • connect/app_remove • connect/app_disconnect • connect/new_user • connect/existing_user • connect/connected • connect/canvas • connect/invite_friends • connect/invite • connect/post_invite
  • 29. app_authorize • User Connects on Your Site • Post-Authorize Callback URL • Capture and Store FB_UID • No User Interface http://wiki.developers.facebook.com/index.php/Account_Linking http://wiki.developers.facebook.com/index.php/Post-Authorize_URL
  • 30. app_remove • User Removes Your App From Within Facebook • Post-Remove Callback URL • Delete Local Mapping Records • No User Interface • New Feature: Account Reclamation http://wiki.developers.facebook.com/index.php/Post-Remove_URL
  • 31. app_disconnect • Triggered by User Action on Your Site • Same as User Removing Your Application From Within Facebook. • Post-Remove Callback URL • No User Interface • Optional, But Recommended $fb->api_client-> auth_revokeAuthorization($fb_uid)
  • 32. registerUsers / unregisterUsers • Creates / Removes Associations For Existing User Accounts • Called in Batches Initially / Periodically • Called For Each New User • No User Interface $fb->api_client-> connect_registerUsers(json_encode($accounts)); $fb->api_client- >connect_unregisterUsers(json_encode($accounts)); http://wiki.developers.facebook.com/index.php/Connect.registerUsers
  • 33. new_user / existing_user • Users That Already Have Local Accounts Can Enter Their Credentials • On Submit – Existing User Accounts Mapped to Current FB_UID and Logged In – New Account Created and Mapped to Current FB_UID – connect_registerUsers Function is Called With Hash of Email Address
  • 36. canvas • apps.facebook.com/yourappname • app/views/connect/canvas.ctp – Implements a Custom Cake Layout for Facebook
  • 38. invite_friends • Facebook UI for Inviting Friends (FBML) – fb:request-form – fb:multi-friend-selector • Could Use Javascript / FBJS – FB.Connect.inviteConnectUsers • fb:request-form Action – connect/post_invite.php http://wiki.developers.facebook.com/index.php/Account_Linking
  • 39. invite_friends // set the destination url for the invitation. $next = $this->Link-> url('/connect/invite?id='.$local_user_id); $this->set("app_add_url", $fb->get_add_url($next)); // Retrieve array of friends who've already authorized the app. $fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$this->loggedInFacebookId.') AND is_app_user = 1'; try { $_friends = $fb->api_client->fql_query($fql); } catch ( Exception $exception ) { }
  • 40. invite_friends <fb:serverfbml style=”width:100%;”> <fb:fbml> <fb:request-form action="<?php echo $link->url('connect/post_invite')?>" ... content="Traxo connects travelers! Share your trips and see where your friends are traveling. <?php echo htmlentities("<fb:req-choice url="$app_add_url" label="Join Traxo"") ?>" > <fb:multi-friend-selector ... exclude_ids="<?php echo $friends; ?>" /> </fb:request-form> </fb:fbml> </fb:serverfbml>
  • 42. post_invite • Called After User Selects and Submits invite_friends • Facebook POSTs Array of Invited Facebook UIDs • “Action” Parameter of invite_friends fb:request-form • No User Interface
  • 43. invite • Destination Handler for Friend Invites • Application Specific • Facebook Will POST to this URL With Any Parameters Specified from invite_friends • No User Interface
  • 44. Questions? ...Launching this Summer
  • 45.
  • 46.
  • 47. More on Layouts facebook.ctp • Used for Any View to be Rendered Within Facebook(.com) • Stylesheets and Javascript – Cached Heavily (and Permanently) – Use <link rel=”src”> with version number – Limited tags – Parsed by Facebook Server http://wiki.developers.facebook.com/index.php/Include_files http://wiki.developers.facebook.com/index.php/Including_Stylesheets_From_PHP
  • 48. More on Layouts facebook_init.ctp • Included by Other Layouts (default.ctp) • Inserted Near the Footer FB_RequireFeatures(["XFBML"], function() { FB.Facebook.init("<?php echo FB_API_KEY; ?>", "/xd_receiver.php"); FB.Facebook.get_sessionWaitable().waitUntilReady(function(session) { var is_now_logged_into_facebook = session ? true : false; if (is_now_logged_into_facebook != already_logged_into_facebook) { FB.Connect.ifUserConnected(fb_onlogin_ready); } FB.XFBML.Host.parseDomTree(); }); });
  • 49. More on Layouts facebook_loader.ctp • Included by Other Layouts (default.ctp) • Inserted Near the Head Tag <?php if ( $SSL ){ ?> <script type="text/javascript" src="https://www.connect.facebook.com/js/api_lib/ v0.4/FeatureLoader.js.php"></script> <?php }else{ ?> <script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/ v0.4/FeatureLoader.js.php"></script> <?php } ?>