SlideShare a Scribd company logo
DESARROLLO DE APLICACIONES
API XFBML Graph FQL
FQL http://developers.facebook.com/docs/reference/fql/ http://developers.facebook.com/docs/reference/rest/fql.query
FQL Tables metrics note page page_admin page_fan permissions photo photo_tag profile standard_user_info status stream stream_filter user album comment cookies connection event event_member friend friend_request friendlist friendlist_member group group_member link
ALGUNOS MÉTODOS ÚTILES
Extraer 10 nombres de mis amigos SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 10 Extraer mi fecha de cumpleaños y dónde vivo SELECT concat(first_name," ","cumpleanios en ",birthday," y vive en ",hometown_location.city) from user where uid=MI_UID Extraer la fecha de cumpleaños y lugar dónde viven 5 amigos SELECT concat(first_name," ","cumpleanios en ",birthday," y vive en ",hometown_location.city) from user where uid in (SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 5)
Extraer nombres de los grupos a los que pertenezco SELECT name FROM group WHERE gid IN (SELECT gid FROM group_member WHERE uid = MI_UID) Extraer los nombres de mis amigos que cumplen anios hoy SELECT name FROM user WHERE strpos(birthday, “MES DIA") = 0 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = MI_UID)
Realizar los Siguientes QUERYS 1.-Extraer los nombres de los gruposquetucompartes con un amigo(aleatorio) 2.- Extraer los nombres de los amigos quesuscumples son hoy y tienen 22 anios
Respuesta de QUERYS 1.-Extraer los nombres de los gruposquetucompartes con un amigo(aleatorio) SELECT name      FROM group      WHERE gid IN ( SELECT gid                      FROM group_member                      WHERE uid=MI_UID                             AND  gid IN (SELECT gid                                      FROM group_member                                      WHERE uid in (SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 1)))
Respuesta de QUERYS 2.- Extraer los nombres de los amigos quesuscumples son hoy y tienen 22 anios: SELECT name FROM user WHERE strpos(birthday, “MES DIA, ANIO") = 0 AND uid IN (SELECT uid2 FROM friend WHERE uid1 =MI_UID)
Graph Api http://developers.facebook.com/docs/api
Graph Api
XFBML http://wiki.developers.facebook.com/index.php/XFBML http://developers.facebook.com/docs/reference/fbml/
Rendering XFBML In order for the user's browser to correctly recognize XFBML tags, you need to specify that the page is in XHTML. Within the <html> tag, add this attribute:
Rendering XFBML In each file, you need to refer to the Facebook JavaScript Feature Loader file, FeatureLoader.js.php. This will allow your site access to all of the features of Facebook Connect in JavaScript, like XFBML, JavaScript API calls, and so forth. This script should be referenced in the BODY of your file, not in the HEAD (for the best performance, put this code right after the <body> tag in the file.). <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml"                                                                 xmlns:fb="http://www.facebook.com/2008/fbml">     <head>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>    </head> <body> <script type="text/javascript"  src="http://connect.facebook.net/en_US/all.js"> </script> <script type="text/javascript"> FB.init({ appIdMyAppId,          status : true, // check login status          cookie : true, // enable cookies to allow the server to access the session xfbml  : true  // parse XFBML        }); </script> </body> </html>

More Related Content

Viewers also liked

Spring 10 New Release Features
Spring 10 New Release FeaturesSpring 10 New Release Features
Spring 10 New Release FeaturesKevin Richardson
 
Varázslat
VarázslatVarázslat
VarázslatSylvi O.
 
Fényképalbum
FényképalbumFényképalbum
FényképalbumSylvi O.
 
Indirect Channel Communication
Indirect Channel CommunicationIndirect Channel Communication
Indirect Channel Communication
Relayware, Inc.
 
Investment appraisal & company valuation for beginners
Investment appraisal & company valuation for beginnersInvestment appraisal & company valuation for beginners
Investment appraisal & company valuation for beginners
Antonio Alcocer
 
iMocial webdevelopment services ppt (english)
iMocial webdevelopment services ppt (english)iMocial webdevelopment services ppt (english)
iMocial webdevelopment services ppt (english)
Job Folbert
 
Pandemic survey vienna cmo conf_2010-08-27
Pandemic survey vienna cmo conf_2010-08-27Pandemic survey vienna cmo conf_2010-08-27
Pandemic survey vienna cmo conf_2010-08-27freespirit7
 
Kutya élet
Kutya életKutya élet
Kutya életSylvi O.
 
Nature best photography
Nature best photographyNature best photography
Nature best photographySylvi O.
 
Verblüffend ähnlich - Megdöbbentő hasonló
Verblüffend ähnlich - Megdöbbentő hasonlóVerblüffend ähnlich - Megdöbbentő hasonló
Verblüffend ähnlich - Megdöbbentő hasonlóSylvi O.
 
Happy Easter
Happy EasterHappy Easter
Happy EasterSylvi O.
 
sweet babies, aranyos babák, süsse babys
sweet babies, aranyos babák, süsse babyssweet babies, aranyos babák, süsse babys
sweet babies, aranyos babák, süsse babysSylvi O.
 
Mothers, Mütter, Anyák
Mothers, Mütter, AnyákMothers, Mütter, Anyák
Mothers, Mütter, AnyákSylvi O.
 
Lourdes felé...
Lourdes felé...Lourdes felé...
Lourdes felé...Sylvi O.
 
Phantastic nature photos
Phantastic nature photosPhantastic nature photos
Phantastic nature photosSylvi O.
 
A 80-as évek Meséi más aspektusbol
A 80-as évek Meséi más aspektusbolA 80-as évek Meséi más aspektusbol
A 80-as évek Meséi más aspektusbolSylvi O.
 

Viewers also liked (20)

Spring 10 New Release Features
Spring 10 New Release FeaturesSpring 10 New Release Features
Spring 10 New Release Features
 
Varázslat
VarázslatVarázslat
Varázslat
 
Fényképalbum
FényképalbumFényképalbum
Fényképalbum
 
Indirect Channel Communication
Indirect Channel CommunicationIndirect Channel Communication
Indirect Channel Communication
 
Investment appraisal & company valuation for beginners
Investment appraisal & company valuation for beginnersInvestment appraisal & company valuation for beginners
Investment appraisal & company valuation for beginners
 
iMocial webdevelopment services ppt (english)
iMocial webdevelopment services ppt (english)iMocial webdevelopment services ppt (english)
iMocial webdevelopment services ppt (english)
 
Pandemic survey vienna cmo conf_2010-08-27
Pandemic survey vienna cmo conf_2010-08-27Pandemic survey vienna cmo conf_2010-08-27
Pandemic survey vienna cmo conf_2010-08-27
 
Humor
HumorHumor
Humor
 
Kutya élet
Kutya életKutya élet
Kutya élet
 
Nature best photography
Nature best photographyNature best photography
Nature best photography
 
Verblüffend ähnlich - Megdöbbentő hasonló
Verblüffend ähnlich - Megdöbbentő hasonlóVerblüffend ähnlich - Megdöbbentő hasonló
Verblüffend ähnlich - Megdöbbentő hasonló
 
Happy Easter
Happy EasterHappy Easter
Happy Easter
 
sweet babies, aranyos babák, süsse babys
sweet babies, aranyos babák, süsse babyssweet babies, aranyos babák, süsse babys
sweet babies, aranyos babák, süsse babys
 
Mothers, Mütter, Anyák
Mothers, Mütter, AnyákMothers, Mütter, Anyák
Mothers, Mütter, Anyák
 
Lourdes felé...
Lourdes felé...Lourdes felé...
Lourdes felé...
 
Phantastic nature photos
Phantastic nature photosPhantastic nature photos
Phantastic nature photos
 
Meghívó
MeghívóMeghívó
Meghívó
 
Nature
NatureNature
Nature
 
Big
BigBig
Big
 
A 80-as évek Meséi más aspektusbol
A 80-as évek Meséi más aspektusbolA 80-as évek Meséi más aspektusbol
A 80-as évek Meséi más aspektusbol
 

Similar to Facebook's Apps II part

Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend Framework
Brett Harris
 
Facebook Connect Integration
Facebook Connect IntegrationFacebook Connect Integration
Facebook Connect Integration
mujahidslideshare
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0
Estelle Weyl
 
Spring Surf 101
Spring Surf 101Spring Surf 101
Spring Surf 101
Alfresco Software
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2Hugo Hamon
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
Patrick Chanezon
 
JavaScript Modules in Practice
JavaScript Modules in PracticeJavaScript Modules in Practice
JavaScript Modules in Practice
Maghdebura
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
James Titcumb
 
Customizing User Profiles
Customizing User ProfilesCustomizing User Profiles
Customizing User Profiles
Traction Software
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBo-Yi Wu
 
23 FACEBOOK APP DEVELOPMENT ESSENTIALS
23 FACEBOOK APP DEVELOPMENT ESSENTIALS23 FACEBOOK APP DEVELOPMENT ESSENTIALS
23 FACEBOOK APP DEVELOPMENT ESSENTIALS
NETNODE AG
 
The social media developer
The social media developer The social media developer
The social media developer
Thet Aung Min Latt
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
James Titcumb
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
James Titcumb
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008Volkan Unsal
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_Tool
Gordon Forsythe
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
Matt Raible
 
Mashups & APIs
Mashups & APIsMashups & APIs
Mashups & APIs
Pamela Fox
 
Daejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service PracticeDaejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service Practice
plusperson
 
前端概述
前端概述前端概述
前端概述
Ethan Zhang
 

Similar to Facebook's Apps II part (20)

Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend Framework
 
Facebook Connect Integration
Facebook Connect IntegrationFacebook Connect Integration
Facebook Connect Integration
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0
 
Spring Surf 101
Spring Surf 101Spring Surf 101
Spring Surf 101
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
 
JavaScript Modules in Practice
JavaScript Modules in PracticeJavaScript Modules in Practice
JavaScript Modules in Practice
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 
Customizing User Profiles
Customizing User ProfilesCustomizing User Profiles
Customizing User Profiles
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php framework
 
23 FACEBOOK APP DEVELOPMENT ESSENTIALS
23 FACEBOOK APP DEVELOPMENT ESSENTIALS23 FACEBOOK APP DEVELOPMENT ESSENTIALS
23 FACEBOOK APP DEVELOPMENT ESSENTIALS
 
The social media developer
The social media developer The social media developer
The social media developer
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_Tool
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Mashups & APIs
Mashups & APIsMashups & APIs
Mashups & APIs
 
Daejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service PracticeDaejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service Practice
 
前端概述
前端概述前端概述
前端概述
 

More from Felix Rivas

Presentacion facebook's apps
Presentacion facebook's appsPresentacion facebook's apps
Presentacion facebook's appsFelix Rivas
 
Facebook app API Vs2.0
Facebook app API Vs2.0Facebook app API Vs2.0
Facebook app API Vs2.0
Felix Rivas
 
Diapositias curso fb 3
Diapositias curso fb 3Diapositias curso fb 3
Diapositias curso fb 3Felix Rivas
 
Productos Trangénicos
Productos TrangénicosProductos Trangénicos
Productos Trangénicos
Felix Rivas
 
Ph
PhPh
Monopolio
MonopolioMonopolio
Monopolio
Felix Rivas
 
Las Drogas
Las DrogasLas Drogas
Las Drogas
Felix Rivas
 
Gases Ideales
Gases IdealesGases Ideales
Gases Ideales
Felix Rivas
 
Cinetica Quimica
Cinetica QuimicaCinetica Quimica
Cinetica Quimica
Felix Rivas
 
Sustancias Higroscopicas
Sustancias HigroscopicasSustancias Higroscopicas
Sustancias Higroscopicas
Felix Rivas
 
Morfologia Del Robot II
Morfologia Del Robot IIMorfologia Del Robot II
Morfologia Del Robot IIFelix Rivas
 
Morfología del robot
Morfología del robotMorfología del robot
Morfología del robotFelix Rivas
 
Fundamentos de Robotica
Fundamentos de RoboticaFundamentos de Robotica
Fundamentos de RoboticaFelix Rivas
 
Emisiones ElectromagnéTicas
Emisiones ElectromagnéTicasEmisiones ElectromagnéTicas
Emisiones ElectromagnéTicasFelix Rivas
 
Fundamentos de programacion
Fundamentos de programacionFundamentos de programacion
Fundamentos de programacion
Felix Rivas
 
Fundamentos de programacion
Fundamentos de programacionFundamentos de programacion
Fundamentos de programacion
Felix Rivas
 
Administración de Empresas - Enfoque Contingencia
Administración de Empresas - Enfoque ContingenciaAdministración de Empresas - Enfoque Contingencia
Administración de Empresas - Enfoque Contingencia
Felix Rivas
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
Felix Rivas
 

More from Felix Rivas (20)

Presentacion facebook's apps
Presentacion facebook's appsPresentacion facebook's apps
Presentacion facebook's apps
 
Facebook app API Vs2.0
Facebook app API Vs2.0Facebook app API Vs2.0
Facebook app API Vs2.0
 
Diapositias curso fb 3
Diapositias curso fb 3Diapositias curso fb 3
Diapositias curso fb 3
 
Productos Trangénicos
Productos TrangénicosProductos Trangénicos
Productos Trangénicos
 
Ph
PhPh
Ph
 
Monopolio
MonopolioMonopolio
Monopolio
 
Las Drogas
Las DrogasLas Drogas
Las Drogas
 
Gases Ideales
Gases IdealesGases Ideales
Gases Ideales
 
Cinetica Quimica
Cinetica QuimicaCinetica Quimica
Cinetica Quimica
 
Sustancias Higroscopicas
Sustancias HigroscopicasSustancias Higroscopicas
Sustancias Higroscopicas
 
Morfologia Del Robot II
Morfologia Del Robot IIMorfologia Del Robot II
Morfologia Del Robot II
 
Sensores II
Sensores IISensores II
Sensores II
 
Robotica2
Robotica2Robotica2
Robotica2
 
Morfología del robot
Morfología del robotMorfología del robot
Morfología del robot
 
Fundamentos de Robotica
Fundamentos de RoboticaFundamentos de Robotica
Fundamentos de Robotica
 
Emisiones ElectromagnéTicas
Emisiones ElectromagnéTicasEmisiones ElectromagnéTicas
Emisiones ElectromagnéTicas
 
Fundamentos de programacion
Fundamentos de programacionFundamentos de programacion
Fundamentos de programacion
 
Fundamentos de programacion
Fundamentos de programacionFundamentos de programacion
Fundamentos de programacion
 
Administración de Empresas - Enfoque Contingencia
Administración de Empresas - Enfoque ContingenciaAdministración de Empresas - Enfoque Contingencia
Administración de Empresas - Enfoque Contingencia
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 

Facebook's Apps II part

  • 4. FQL Tables metrics note page page_admin page_fan permissions photo photo_tag profile standard_user_info status stream stream_filter user album comment cookies connection event event_member friend friend_request friendlist friendlist_member group group_member link
  • 5.
  • 6.
  • 7.
  • 8.
  • 10. Extraer 10 nombres de mis amigos SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 10 Extraer mi fecha de cumpleaños y dónde vivo SELECT concat(first_name," ","cumpleanios en ",birthday," y vive en ",hometown_location.city) from user where uid=MI_UID Extraer la fecha de cumpleaños y lugar dónde viven 5 amigos SELECT concat(first_name," ","cumpleanios en ",birthday," y vive en ",hometown_location.city) from user where uid in (SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 5)
  • 11. Extraer nombres de los grupos a los que pertenezco SELECT name FROM group WHERE gid IN (SELECT gid FROM group_member WHERE uid = MI_UID) Extraer los nombres de mis amigos que cumplen anios hoy SELECT name FROM user WHERE strpos(birthday, “MES DIA") = 0 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = MI_UID)
  • 12. Realizar los Siguientes QUERYS 1.-Extraer los nombres de los gruposquetucompartes con un amigo(aleatorio) 2.- Extraer los nombres de los amigos quesuscumples son hoy y tienen 22 anios
  • 13. Respuesta de QUERYS 1.-Extraer los nombres de los gruposquetucompartes con un amigo(aleatorio) SELECT name FROM group WHERE gid IN ( SELECT gid FROM group_member WHERE uid=MI_UID AND gid IN (SELECT gid FROM group_member WHERE uid in (SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 1)))
  • 14. Respuesta de QUERYS 2.- Extraer los nombres de los amigos quesuscumples son hoy y tienen 22 anios: SELECT name FROM user WHERE strpos(birthday, “MES DIA, ANIO") = 0 AND uid IN (SELECT uid2 FROM friend WHERE uid1 =MI_UID)
  • 18. Rendering XFBML In order for the user's browser to correctly recognize XFBML tags, you need to specify that the page is in XHTML. Within the <html> tag, add this attribute:
  • 19. Rendering XFBML In each file, you need to refer to the Facebook JavaScript Feature Loader file, FeatureLoader.js.php. This will allow your site access to all of the features of Facebook Connect in JavaScript, like XFBML, JavaScript API calls, and so forth. This script should be referenced in the BODY of your file, not in the HEAD (for the best performance, put this code right after the <body> tag in the file.). <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
  • 20. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"> </script> <script type="text/javascript"> FB.init({ appIdMyAppId, status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); </script> </body> </html>