SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Facebook PHP Framework Facebook PHP Framework ovvero programmiamoci  faccialibro  col nostro linguaggio preferito
Facebook PHP Framework ,[object Object]
Data: Corropoli 15/05/2010
Area: PHP Open Source
Target: Java Nerd (almeno secondo facebook)
Difficoltà: Media-Bassa Facebook è il maggior social network mondiale Vedremo come è possibile creare delle applicazioni per Facebook Vedremo cosa significa FBML, FQL, REST Server, Social Plugin, Graph API  e FBJS Vedremo soprattutto come PHP è la naturale estensione di Facebook Da 0 a 100 in 60 minuti, allacciate le cinture ;)
Facebook PHP Framework Cos'è Facebook? ,[object Object]
Permette di cercare facilmente amici e colleghi di lavoro
È facile da usare
Sposa le filosofie Web 2.0
Permette a chiunque di creare programmi, in grado di accedere al suo database di informazioni
Permette una distribuzione di massa delle proprie applicazioni
Facebook PHP Framework Storia ,[object Object]
Il dominio attuale, facebook.com, fu registrato soltanto in seguito, tra l'aprile e l'agosto 2005
Dall'11 settembre 2006, chiunque abbia più di 12 anni può parteciparvi
Dal settembre 2006 al settembre 2007 la posizione nella graduatoria del traffico dei siti è passata, secondo Alexa, dalla sessantesima alla settima posizione.
In Italia c'è stato un boom nel 2008: nel mese di agosto si sono registrate oltre un milione e trecentomila visite, con un incremento annuo del 961%
Gli utenti italiani nel mese di marzo 2010 sono circa 15.5 milioni.
Nel 2010 ha superato, negli Stati Uniti e per una settimana, gli accessi di Google Fonte: http://it.wikipedia.org/wiki/Facebook
Facebook PHP Framework È entrato nella comicità La mia ragazza è cosi patita di Facebook, che prima di fare l'amore con me  crea un evento.
Facebook PHP Framework Nei cartoni animati http://www.southparkstudios.com/episodes/267112
Facebook PHP Framework Ma non è che tutto questo è pericoloso? Nota: questa è la prima immagine della SERP “pericoloso”
Facebook PHP Framework Ho messo tutta la mia vita su Facebook. Mi iscrivo a qualsiasi gruppo MA E' SOLO PER RIDERE
Facebook PHP Framework E se dall'altra parte ci fosse un programmatore che col codice fa i salti mortali? Ma serve fare un salto mortale?
Facebook PHP Framework Core API ,[object Object]
Social plugin Advanced API ,[object Object]
FBML/XFBML (estensioni ai tag X/HTML)
REST API (obsolete) SDK ,[object Object]
PHP API (FQL + rest API based) - Python SDK -  iPhone SDK - Android SDK (unofficial)
Facebook PHP Framework Core API - Graph   ,[object Object]
Facebook PHP Framework https://graph.facebook.com/ 543107502   { "id": " 543107502 ", "name": "Matteo Baccan", "first_name": "Matteo", "last_name": "Baccan", "link": "http://www.facebook.com/matteo.baccan", "location": { "id": 110987652259139, "name": "Novara, Italy" } }
Facebook PHP Framework Introspection ,[object Object]
https://graph.facebook.com/ <ID> ?metadata=1
Facebook PHP Framework https://graph.facebook.com/ 543107502 ?metadata=1 { &quot;id&quot;: &quot; 543107502 &quot;, &quot;name&quot;: &quot;Matteo Baccan&quot;, &quot;first_name&quot;: &quot;Matteo&quot;, &quot;last_name&quot;: &quot;Baccan&quot;, &quot;link&quot;: &quot;http://www.facebook.com/matteo.baccan&quot;, &quot;location&quot;: { &quot;id&quot;: 110987652259139, &quot;name&quot;: &quot;Novara, Italy&quot; }, &quot;metadata&quot;: { &quot;connections&quot;: { &quot;home&quot;: &quot;https://graph.facebook.com/543107502/home&quot;, &quot;feed&quot;: &quot;https://graph.facebook.com/543107502/feed&quot;, &quot;friends&quot;: &quot; https://graph.facebook.com/543107502/friends &quot;, &quot;activities&quot;: &quot;https://graph.facebook.com/543107502/activities&quot;,  etc etc etc .. } }, &quot;type&quot;: &quot;user&quot; }
Facebook PHP Framework Altre feature - snippet ,[object Object]
Publishing –  pubblica dei dati curl -F 'access_token=...' -F 'message=Ciao Matteo' https://graph.facebook.com/matteo.baccan/feed
Delete  – rimuove delle informazioni https://graph.facebook.com/<COMMENT_ID>?method=delete
Picture  – prende l'immagine associata a un oggetto <img src=&quot;https://graph.facebook.com/matteo.baccan/picture&quot;/>  <img src=&quot;https://graph.facebook.com/710160778/picture&quot;/>
Search  – cerca dei dati https://graph.facebook.com/search?q=programming&type=group
Analytics  – preleva le statistiche della vostra applicazione
Facebook PHP Framework Core API – social plugin ,[object Object],Like Button Activity Feed Recommendations Like Box Login with Faces Facepile Comments Live Stream
Facebook PHP Framework Like Button di PHPDay.it <iframe  src=&quot; http://www.facebook.com/plugins/like.php ?href= http%253A%252F%252Fwww.phpday.it &amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=80&quot;  scrolling=&quot;no&quot;  frameborder=&quot;0&quot;  style=&quot;border:none; overflow:hidden; width:450px; height:80px;&quot;  allowTransparency=&quot;true&quot;> </iframe>
Facebook PHP Framework Advanced API ,[object Object]
XFBLM/FBML - Facebook Markup Language
REST API (obsolete) SDK ,[object Object]
PHP API
Facebook PHP Framework FQL - Facebook Query Language Permettono di effettuare delle query sulle tabelle facebook La sintassi delle query FQL è simile a quella delle query SQL XFBML/FBML - Facebook Markup Language  È simile alla sintassi HTML e permette una facile integrazione con la piattaforma facebook REST API (obsolete)  Permettono di accedere ad ogni informazione che un utente espone alla tua applicazione Permettono l'accesso ai profili, agli amici, alle foto, ai gruppi etc etc Restituiscono risultati in formati diversi Json/XML FBJS – Facebook Javascript Framework È simile alla sintassi HTML e permette una facile integrazione con la piattaforma facebook PHP API Classi PHP che incapsulano le chiamate FQL/Core API
Facebook PHP Framework Tipologie di applicazioni ,[object Object]
Internal Facebook Application Applicazione web eseguita su un server  NON  facebook, ma integrata in facebook.com
External Desktop Application Applicazione eseguita su un desktop, ma fortemente collegata col web Questi tre tipi di applicazione permettono agli sviluppatori di utilizzare i dati Facebook all'interno di qualsiasi applicazione
Facebook PHP Framework Linguaggi supportati Facebook ufficialmente supporta  PHP 5  e  Javascript  Facebook è partner di Microsoft per supportare applicazioni  .Net  e di Adobe per la versione  ActionScript 3.0 Esistono altre API, anche se in versione non ufficiale: Android C++ Java  Cocoa  Perl Python Ruby etc....
Facebook PHP Framework

Weitere ähnliche Inhalte

Andere mochten auch

Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015
Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015
Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015Matteo Baccan
 
Open Street Map vs Google Maps
Open Street Map vs Google MapsOpen Street Map vs Google Maps
Open Street Map vs Google MapsAndrea Volpini
 
Confronto fra web services framework (open source)
Confronto fra web services framework (open source)Confronto fra web services framework (open source)
Confronto fra web services framework (open source)Alberto Lagna
 
[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mapping[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mappingIvano Malavolta
 
I don't know,But I konw
I don't know,But I konwI don't know,But I konw
I don't know,But I konwfengleilei
 
Cat And Mouse Story
Cat And Mouse StoryCat And Mouse Story
Cat And Mouse Storyguestd57ddf
 
Learning Pool: Work life balance 1 the secrets to building confidence resili...
Learning Pool: Work life balance 1  the secrets to building confidence resili...Learning Pool: Work life balance 1  the secrets to building confidence resili...
Learning Pool: Work life balance 1 the secrets to building confidence resili...Paul McElvaney
 
Learning Pool webinar: Engage more to learn more
Learning Pool webinar: Engage more to learn moreLearning Pool webinar: Engage more to learn more
Learning Pool webinar: Engage more to learn morePaul McElvaney
 
090703 Sns Miyamura
090703 Sns Miyamura090703 Sns Miyamura
090703 Sns Miyamurayuu_2003
 
Dave Briggs on digital engagement
Dave Briggs on digital engagementDave Briggs on digital engagement
Dave Briggs on digital engagementPaul McElvaney
 
01.2007 Culto Ferias
01.2007   Culto Ferias01.2007   Culto Ferias
01.2007 Culto FeriasJubrac Jacui
 
Culto De Ferias - 19.07.07
Culto De Ferias - 19.07.07Culto De Ferias - 19.07.07
Culto De Ferias - 19.07.07Jubrac Jacui
 
Blackpool Council's Stuart Gilbert - Technology as the Enabler
Blackpool Council's Stuart Gilbert - Technology as the EnablerBlackpool Council's Stuart Gilbert - Technology as the Enabler
Blackpool Council's Stuart Gilbert - Technology as the EnablerPaul McElvaney
 

Andere mochten auch (20)

Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015
Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015
Matteo Baccan - Valerio Tognozzi - Novara LinuxDay 2015
 
Open Street Map vs Google Maps
Open Street Map vs Google MapsOpen Street Map vs Google Maps
Open Street Map vs Google Maps
 
Confronto fra web services framework (open source)
Confronto fra web services framework (open source)Confronto fra web services framework (open source)
Confronto fra web services framework (open source)
 
Map interfaces
Map interfaces Map interfaces
Map interfaces
 
[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mapping[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mapping
 
Gai
GaiGai
Gai
 
Niver Fe 18.02.07
Niver Fe 18.02.07Niver Fe 18.02.07
Niver Fe 18.02.07
 
I don't know,But I konw
I don't know,But I konwI don't know,But I konw
I don't know,But I konw
 
Lecture25
Lecture25Lecture25
Lecture25
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
因水而生
因水而生因水而生
因水而生
 
Cat And Mouse Story
Cat And Mouse StoryCat And Mouse Story
Cat And Mouse Story
 
Learning Pool: Work life balance 1 the secrets to building confidence resili...
Learning Pool: Work life balance 1  the secrets to building confidence resili...Learning Pool: Work life balance 1  the secrets to building confidence resili...
Learning Pool: Work life balance 1 the secrets to building confidence resili...
 
Guia de blogger
Guia de bloggerGuia de blogger
Guia de blogger
 
Learning Pool webinar: Engage more to learn more
Learning Pool webinar: Engage more to learn moreLearning Pool webinar: Engage more to learn more
Learning Pool webinar: Engage more to learn more
 
090703 Sns Miyamura
090703 Sns Miyamura090703 Sns Miyamura
090703 Sns Miyamura
 
Dave Briggs on digital engagement
Dave Briggs on digital engagementDave Briggs on digital engagement
Dave Briggs on digital engagement
 
01.2007 Culto Ferias
01.2007   Culto Ferias01.2007   Culto Ferias
01.2007 Culto Ferias
 
Culto De Ferias - 19.07.07
Culto De Ferias - 19.07.07Culto De Ferias - 19.07.07
Culto De Ferias - 19.07.07
 
Blackpool Council's Stuart Gilbert - Technology as the Enabler
Blackpool Council's Stuart Gilbert - Technology as the EnablerBlackpool Council's Stuart Gilbert - Technology as the Enabler
Blackpool Council's Stuart Gilbert - Technology as the Enabler
 

Ähnlich wie Phpday 2010: facebook php framework

Webtech 2010: facebook framework
Webtech 2010: facebook frameworkWebtech 2010: facebook framework
Webtech 2010: facebook frameworkMatteo Baccan
 
Confsl 2010 Facebook Framework
Confsl 2010 Facebook FrameworkConfsl 2010 Facebook Framework
Confsl 2010 Facebook FrameworkMatteo Baccan
 
Sviluppare estensioni per google chrome
Sviluppare estensioni per google chromeSviluppare estensioni per google chrome
Sviluppare estensioni per google chromeMarco Vito Moscaritolo
 
Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...
Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...
Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...Girl Geek Dinners Milano
 
Introduzione al linguaggio PHP
Introduzione al linguaggio PHPIntroduzione al linguaggio PHP
Introduzione al linguaggio PHPextrategy
 
Venezia 2010 Facebook Developer Garage Parte1
Venezia 2010 Facebook Developer Garage Parte1Venezia 2010 Facebook Developer Garage Parte1
Venezia 2010 Facebook Developer Garage Parte1Roberto Marmo
 
Be wizard 2012 - content - seo - links - gianluca fiorelli
Be wizard 2012 - content - seo - links - gianluca fiorelliBe wizard 2012 - content - seo - links - gianluca fiorelli
Be wizard 2012 - content - seo - links - gianluca fiorelliGianluca Fiorelli
 
I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)Diego La Monica
 
Tecniche Di Mashup
Tecniche Di MashupTecniche Di Mashup
Tecniche Di MashupYeser Rema
 
Tecniche Di Mashup
Tecniche Di MashupTecniche Di Mashup
Tecniche Di Mashupfoxhunterdj
 
Un social network su piattaforma Joomla!
Un social network su piattaforma Joomla!Un social network su piattaforma Joomla!
Un social network su piattaforma Joomla!Carlo Daniele
 
Rich Internet Application con Flex, AIR e Java
Rich Internet Application con Flex, AIR e JavaRich Internet Application con Flex, AIR e Java
Rich Internet Application con Flex, AIR e Javamarcocasario
 
Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...
Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...
Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...Vincenzo Patruno
 
Hosting: il linguaggio PHP tra passato, presente e futuro #TipOfTheDay
Hosting: il linguaggio PHP tra passato, presente e futuro  #TipOfTheDayHosting: il linguaggio PHP tra passato, presente e futuro  #TipOfTheDay
Hosting: il linguaggio PHP tra passato, presente e futuro #TipOfTheDayAruba S.p.A.
 
Tech Webinar: Firefox Developer Tool
Tech Webinar: Firefox Developer ToolTech Webinar: Firefox Developer Tool
Tech Webinar: Firefox Developer ToolCodemotion
 

Ähnlich wie Phpday 2010: facebook php framework (20)

Webtech 2010: facebook framework
Webtech 2010: facebook frameworkWebtech 2010: facebook framework
Webtech 2010: facebook framework
 
Confsl 2010 Facebook Framework
Confsl 2010 Facebook FrameworkConfsl 2010 Facebook Framework
Confsl 2010 Facebook Framework
 
Sviluppare estensioni per google chrome
Sviluppare estensioni per google chromeSviluppare estensioni per google chrome
Sviluppare estensioni per google chrome
 
Dal Click Al Web Server
Dal Click Al Web ServerDal Click Al Web Server
Dal Click Al Web Server
 
Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...
Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...
Interfacce web – giocarci per conoscerle, conoscerle per usarle meglio - Olja...
 
Introduzione al linguaggio PHP
Introduzione al linguaggio PHPIntroduzione al linguaggio PHP
Introduzione al linguaggio PHP
 
Venezia 2010 Facebook Developer Garage Parte1
Venezia 2010 Facebook Developer Garage Parte1Venezia 2010 Facebook Developer Garage Parte1
Venezia 2010 Facebook Developer Garage Parte1
 
Be wizard 2012 - content - seo - links - gianluca fiorelli
Be wizard 2012 - content - seo - links - gianluca fiorelliBe wizard 2012 - content - seo - links - gianluca fiorelli
Be wizard 2012 - content - seo - links - gianluca fiorelli
 
I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)I Linguaggi Del Web (1° Giornata)
I Linguaggi Del Web (1° Giornata)
 
Sviluppare applicazioni Facebook
Sviluppare applicazioni FacebookSviluppare applicazioni Facebook
Sviluppare applicazioni Facebook
 
Tecniche Di Mashup
Tecniche Di MashupTecniche Di Mashup
Tecniche Di Mashup
 
Tecniche Di Mashup
Tecniche Di MashupTecniche Di Mashup
Tecniche Di Mashup
 
Un social network su piattaforma Joomla!
Un social network su piattaforma Joomla!Un social network su piattaforma Joomla!
Un social network su piattaforma Joomla!
 
Rich Internet Application con Flex, AIR e Java
Rich Internet Application con Flex, AIR e JavaRich Internet Application con Flex, AIR e Java
Rich Internet Application con Flex, AIR e Java
 
8. Architetture web
8. Architetture web8. Architetture web
8. Architetture web
 
Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...
Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...
Web Services, le librerie Nusoap e PHP5 nell’interrogazione dei dati demograf...
 
Hosting: il linguaggio PHP tra passato, presente e futuro #TipOfTheDay
Hosting: il linguaggio PHP tra passato, presente e futuro  #TipOfTheDayHosting: il linguaggio PHP tra passato, presente e futuro  #TipOfTheDay
Hosting: il linguaggio PHP tra passato, presente e futuro #TipOfTheDay
 
Tech Webinar: Firefox Developer Tool
Tech Webinar: Firefox Developer ToolTech Webinar: Firefox Developer Tool
Tech Webinar: Firefox Developer Tool
 
Seo html russo
Seo html russoSeo html russo
Seo html russo
 
Php for ASP.NET Developers
Php for ASP.NET DevelopersPhp for ASP.NET Developers
Php for ASP.NET Developers
 

Mehr von Matteo Baccan

Matteo baccan raspberry pi - linox 2015 - corso parte 3
Matteo baccan   raspberry pi - linox 2015 - corso parte 3Matteo baccan   raspberry pi - linox 2015 - corso parte 3
Matteo baccan raspberry pi - linox 2015 - corso parte 3Matteo Baccan
 
Matteo baccan raspberry pi - linox 2015 - corso parte 2
Matteo baccan   raspberry pi - linox 2015 - corso parte 2Matteo baccan   raspberry pi - linox 2015 - corso parte 2
Matteo baccan raspberry pi - linox 2015 - corso parte 2Matteo Baccan
 
Matteo baccan raspberry pi - linox 2015 - corso parte 1
Matteo baccan   raspberry pi - linox 2015 - corso parte 1Matteo baccan   raspberry pi - linox 2015 - corso parte 1
Matteo baccan raspberry pi - linox 2015 - corso parte 1Matteo Baccan
 
Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...
Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...
Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...Matteo Baccan
 
Matteo baccan raspberry pi - linox 2014
Matteo baccan   raspberry pi - linox 2014Matteo baccan   raspberry pi - linox 2014
Matteo baccan raspberry pi - linox 2014Matteo Baccan
 
Codemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi Cluster
Codemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi ClusterCodemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi Cluster
Codemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi ClusterMatteo Baccan
 
javaday 2006 - Tiger
javaday 2006 - Tigerjavaday 2006 - Tiger
javaday 2006 - TigerMatteo Baccan
 
Phpday 2009 php e java
Phpday 2009 php e javaPhpday 2009 php e java
Phpday 2009 php e javaMatteo Baccan
 
Javaday 2009 php e java
Javaday 2009 php e javaJavaday 2009 php e java
Javaday 2009 php e javaMatteo Baccan
 
Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...
Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...
Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...Matteo Baccan
 
Stack Overflow meetup html2pop3
Stack Overflow meetup html2pop3 Stack Overflow meetup html2pop3
Stack Overflow meetup html2pop3 Matteo Baccan
 
Codemotion 2012 : Sphinx: Open Source Search Server
Codemotion 2012 : Sphinx: Open Source Search ServerCodemotion 2012 : Sphinx: Open Source Search Server
Codemotion 2012 : Sphinx: Open Source Search ServerMatteo Baccan
 
Codemotion twitter programming
Codemotion twitter programmingCodemotion twitter programming
Codemotion twitter programmingMatteo Baccan
 
Webtech 2010: twitter programming
Webtech 2010: twitter programmingWebtech 2010: twitter programming
Webtech 2010: twitter programmingMatteo Baccan
 
Webbit 2004: Tiger, java
Webbit 2004: Tiger, javaWebbit 2004: Tiger, java
Webbit 2004: Tiger, javaMatteo Baccan
 
Webbit 2004: Aspectj
Webbit 2004: AspectjWebbit 2004: Aspectj
Webbit 2004: AspectjMatteo Baccan
 
JIPDay 2005: Xlet Java Programming
JIPDay 2005: Xlet Java ProgrammingJIPDay 2005: Xlet Java Programming
JIPDay 2005: Xlet Java ProgrammingMatteo Baccan
 
Javaday 2006: Java 5
Javaday 2006: Java 5Javaday 2006: Java 5
Javaday 2006: Java 5Matteo Baccan
 
Javaday 2007: skype4java
Javaday 2007: skype4javaJavaday 2007: skype4java
Javaday 2007: skype4javaMatteo Baccan
 

Mehr von Matteo Baccan (20)

Gmail e google app
Gmail e google appGmail e google app
Gmail e google app
 
Matteo baccan raspberry pi - linox 2015 - corso parte 3
Matteo baccan   raspberry pi - linox 2015 - corso parte 3Matteo baccan   raspberry pi - linox 2015 - corso parte 3
Matteo baccan raspberry pi - linox 2015 - corso parte 3
 
Matteo baccan raspberry pi - linox 2015 - corso parte 2
Matteo baccan   raspberry pi - linox 2015 - corso parte 2Matteo baccan   raspberry pi - linox 2015 - corso parte 2
Matteo baccan raspberry pi - linox 2015 - corso parte 2
 
Matteo baccan raspberry pi - linox 2015 - corso parte 1
Matteo baccan   raspberry pi - linox 2015 - corso parte 1Matteo baccan   raspberry pi - linox 2015 - corso parte 1
Matteo baccan raspberry pi - linox 2015 - corso parte 1
 
Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...
Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...
Creazione di una stazione meteo con prodotti opensource. Linux day 2014 - Lin...
 
Matteo baccan raspberry pi - linox 2014
Matteo baccan   raspberry pi - linox 2014Matteo baccan   raspberry pi - linox 2014
Matteo baccan raspberry pi - linox 2014
 
Codemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi Cluster
Codemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi ClusterCodemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi Cluster
Codemotion 2014 : ottimizzare JAVA e PHP su un’architettura Raspberry Pi Cluster
 
javaday 2006 - Tiger
javaday 2006 - Tigerjavaday 2006 - Tiger
javaday 2006 - Tiger
 
Phpday 2009 php e java
Phpday 2009 php e javaPhpday 2009 php e java
Phpday 2009 php e java
 
Javaday 2009 php e java
Javaday 2009 php e javaJavaday 2009 php e java
Javaday 2009 php e java
 
Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...
Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...
Codemotion 2013: Succo di lampone: come ottimizzare JAVA e PHP su un’architet...
 
Stack Overflow meetup html2pop3
Stack Overflow meetup html2pop3 Stack Overflow meetup html2pop3
Stack Overflow meetup html2pop3
 
Codemotion 2012 : Sphinx: Open Source Search Server
Codemotion 2012 : Sphinx: Open Source Search ServerCodemotion 2012 : Sphinx: Open Source Search Server
Codemotion 2012 : Sphinx: Open Source Search Server
 
Codemotion twitter programming
Codemotion twitter programmingCodemotion twitter programming
Codemotion twitter programming
 
Webtech 2010: twitter programming
Webtech 2010: twitter programmingWebtech 2010: twitter programming
Webtech 2010: twitter programming
 
Webbit 2004: Tiger, java
Webbit 2004: Tiger, javaWebbit 2004: Tiger, java
Webbit 2004: Tiger, java
 
Webbit 2004: Aspectj
Webbit 2004: AspectjWebbit 2004: Aspectj
Webbit 2004: Aspectj
 
JIPDay 2005: Xlet Java Programming
JIPDay 2005: Xlet Java ProgrammingJIPDay 2005: Xlet Java Programming
JIPDay 2005: Xlet Java Programming
 
Javaday 2006: Java 5
Javaday 2006: Java 5Javaday 2006: Java 5
Javaday 2006: Java 5
 
Javaday 2007: skype4java
Javaday 2007: skype4javaJavaday 2007: skype4java
Javaday 2007: skype4java
 

Kürzlich hochgeladen

Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Associazione Digital Days
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Associazione Digital Days
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Associazione Digital Days
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Associazione Digital Days
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Associazione Digital Days
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Associazione Digital Days
 
ScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AIScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AIinfogdgmi
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Associazione Digital Days
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Associazione Digital Days
 

Kürzlich hochgeladen (9)

Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
 
ScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AIScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AI
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
 

Phpday 2010: facebook php framework

  • 1. Facebook PHP Framework Facebook PHP Framework ovvero programmiamoci faccialibro col nostro linguaggio preferito
  • 2.
  • 4. Area: PHP Open Source
  • 5. Target: Java Nerd (almeno secondo facebook)
  • 6. Difficoltà: Media-Bassa Facebook è il maggior social network mondiale Vedremo come è possibile creare delle applicazioni per Facebook Vedremo cosa significa FBML, FQL, REST Server, Social Plugin, Graph API e FBJS Vedremo soprattutto come PHP è la naturale estensione di Facebook Da 0 a 100 in 60 minuti, allacciate le cinture ;)
  • 7.
  • 8. Permette di cercare facilmente amici e colleghi di lavoro
  • 9. È facile da usare
  • 11. Permette a chiunque di creare programmi, in grado di accedere al suo database di informazioni
  • 12. Permette una distribuzione di massa delle proprie applicazioni
  • 13.
  • 14. Il dominio attuale, facebook.com, fu registrato soltanto in seguito, tra l'aprile e l'agosto 2005
  • 15. Dall'11 settembre 2006, chiunque abbia più di 12 anni può parteciparvi
  • 16. Dal settembre 2006 al settembre 2007 la posizione nella graduatoria del traffico dei siti è passata, secondo Alexa, dalla sessantesima alla settima posizione.
  • 17. In Italia c'è stato un boom nel 2008: nel mese di agosto si sono registrate oltre un milione e trecentomila visite, con un incremento annuo del 961%
  • 18. Gli utenti italiani nel mese di marzo 2010 sono circa 15.5 milioni.
  • 19. Nel 2010 ha superato, negli Stati Uniti e per una settimana, gli accessi di Google Fonte: http://it.wikipedia.org/wiki/Facebook
  • 20. Facebook PHP Framework È entrato nella comicità La mia ragazza è cosi patita di Facebook, che prima di fare l'amore con me crea un evento.
  • 21. Facebook PHP Framework Nei cartoni animati http://www.southparkstudios.com/episodes/267112
  • 22. Facebook PHP Framework Ma non è che tutto questo è pericoloso? Nota: questa è la prima immagine della SERP “pericoloso”
  • 23. Facebook PHP Framework Ho messo tutta la mia vita su Facebook. Mi iscrivo a qualsiasi gruppo MA E' SOLO PER RIDERE
  • 24. Facebook PHP Framework E se dall'altra parte ci fosse un programmatore che col codice fa i salti mortali? Ma serve fare un salto mortale?
  • 25.
  • 26.
  • 28.
  • 29. PHP API (FQL + rest API based) - Python SDK - iPhone SDK - Android SDK (unofficial)
  • 30.
  • 31. Facebook PHP Framework https://graph.facebook.com/ 543107502 { &quot;id&quot;: &quot; 543107502 &quot;, &quot;name&quot;: &quot;Matteo Baccan&quot;, &quot;first_name&quot;: &quot;Matteo&quot;, &quot;last_name&quot;: &quot;Baccan&quot;, &quot;link&quot;: &quot;http://www.facebook.com/matteo.baccan&quot;, &quot;location&quot;: { &quot;id&quot;: 110987652259139, &quot;name&quot;: &quot;Novara, Italy&quot; } }
  • 32.
  • 34. Facebook PHP Framework https://graph.facebook.com/ 543107502 ?metadata=1 { &quot;id&quot;: &quot; 543107502 &quot;, &quot;name&quot;: &quot;Matteo Baccan&quot;, &quot;first_name&quot;: &quot;Matteo&quot;, &quot;last_name&quot;: &quot;Baccan&quot;, &quot;link&quot;: &quot;http://www.facebook.com/matteo.baccan&quot;, &quot;location&quot;: { &quot;id&quot;: 110987652259139, &quot;name&quot;: &quot;Novara, Italy&quot; }, &quot;metadata&quot;: { &quot;connections&quot;: { &quot;home&quot;: &quot;https://graph.facebook.com/543107502/home&quot;, &quot;feed&quot;: &quot;https://graph.facebook.com/543107502/feed&quot;, &quot;friends&quot;: &quot; https://graph.facebook.com/543107502/friends &quot;, &quot;activities&quot;: &quot;https://graph.facebook.com/543107502/activities&quot;, etc etc etc .. } }, &quot;type&quot;: &quot;user&quot; }
  • 35.
  • 36. Publishing – pubblica dei dati curl -F 'access_token=...' -F 'message=Ciao Matteo' https://graph.facebook.com/matteo.baccan/feed
  • 37. Delete – rimuove delle informazioni https://graph.facebook.com/<COMMENT_ID>?method=delete
  • 38. Picture – prende l'immagine associata a un oggetto <img src=&quot;https://graph.facebook.com/matteo.baccan/picture&quot;/> <img src=&quot;https://graph.facebook.com/710160778/picture&quot;/>
  • 39. Search – cerca dei dati https://graph.facebook.com/search?q=programming&type=group
  • 40. Analytics – preleva le statistiche della vostra applicazione
  • 41.
  • 42. Facebook PHP Framework Like Button di PHPDay.it <iframe src=&quot; http://www.facebook.com/plugins/like.php ?href= http%253A%252F%252Fwww.phpday.it &amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=80&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:450px; height:80px;&quot; allowTransparency=&quot;true&quot;> </iframe>
  • 43.
  • 44. XFBLM/FBML - Facebook Markup Language
  • 45.
  • 47. Facebook PHP Framework FQL - Facebook Query Language Permettono di effettuare delle query sulle tabelle facebook La sintassi delle query FQL è simile a quella delle query SQL XFBML/FBML - Facebook Markup Language È simile alla sintassi HTML e permette una facile integrazione con la piattaforma facebook REST API (obsolete) Permettono di accedere ad ogni informazione che un utente espone alla tua applicazione Permettono l'accesso ai profili, agli amici, alle foto, ai gruppi etc etc Restituiscono risultati in formati diversi Json/XML FBJS – Facebook Javascript Framework È simile alla sintassi HTML e permette una facile integrazione con la piattaforma facebook PHP API Classi PHP che incapsulano le chiamate FQL/Core API
  • 48.
  • 49. Internal Facebook Application Applicazione web eseguita su un server NON facebook, ma integrata in facebook.com
  • 50. External Desktop Application Applicazione eseguita su un desktop, ma fortemente collegata col web Questi tre tipi di applicazione permettono agli sviluppatori di utilizzare i dati Facebook all'interno di qualsiasi applicazione
  • 51. Facebook PHP Framework Linguaggi supportati Facebook ufficialmente supporta PHP 5 e Javascript Facebook è partner di Microsoft per supportare applicazioni .Net e di Adobe per la versione ActionScript 3.0 Esistono altre API, anche se in versione non ufficiale: Android C++ Java Cocoa Perl Python Ruby etc....
  • 53. Facebook PHP Framework Ma come si sviluppa una applicazione Facebook?
  • 54. Facebook PHP Framework Dal sito Facebook :) http://www.facebook.com/developers/createapp.php
  • 55. Facebook PHP Framework Download di XD_RECEIVER.HTM
  • 56. Facebook PHP Framework Cross Domain Communication Channel - xd_receiver.htm La JavaScript Client Library di Facebook usa una libreria di comunicazione cross-domain per stabilire la comunicazione fra le pagine di terze parti e le pagine e i servizi Facebook. Per referenziare la libreria occorre file di comunicazione cross-domain <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;><html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;><head><title>xd</title></head><body><script src=&quot; http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js &quot; type=&quot;text/javascript&quot;></script></body></html>
  • 58. Facebook PHP Framework Dalla seconda applicazione in poi basta il nome :)
  • 59.
  • 61.
  • 62. Facebook PHP Framework <script src=&quot;http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/it_IT&quot; type=&quot;text/javascript&quot;></script> <script type=&quot;text/javascript&quot;> FB_RequireFeatures([&quot;XFBML&quot;], function() { FB.Facebook.init(&quot; 4e4b147cab0bf4f47032f2e7c4ae1680 &quot;, &quot; xd_receiver.htm &quot;, { &quot; ifUserNotConnected &quot;:&quot;facebookconnect.htm&quot; }); }); </script> Ciao <fb:name uid=&quot; loggedinuser &quot; useyou=&quot;false&quot; linked=&quot;true&quot;></fb:name> External Web Application – struttura base di un'applicazione - main
  • 63. Facebook PHP Framework <script src=&quot;http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/it_IT&quot; type=&quot;text/javascript&quot;></script> <script type=&quot;text/javascript&quot;> FB_RequireFeatures([&quot;XFBML&quot;], function() { FB.Facebook.init(&quot; 4e4b147cab0bf4f47032f2e7c4ae1680 &quot;, &quot; xd_receiver.htm &quot;, { &quot; ifUserConnected &quot;:&quot;facebook.htm&quot; }); }); </script> <fb:login-button v=&quot;2&quot; size=&quot;medium&quot; onlogin=&quot;window.location.reload(true);&quot;> Login </fb:login-button> External Web Application – struttura base di un'applicazione - login
  • 64.
  • 65. Canvas Callback URL – rappresenta il percorso dell'applicazione sui vostri server. NB: deve terminare con “/” o contenere un “?” da qualche parte
  • 66. Facebook PHP Framework Canvas FBML Profili API Internal Web Application – struttura FACEBOOK EXTERNAL
  • 67. Facebook PHP Framework Internal Web Application – demo - http://apps.facebook.com/pandoro/
  • 69. Facebook PHP Framework PHP API Le API Facebook sono condensate in 3 file .PHP facebook.php = classe Facebook facebook_mobile.php = classe FacebookMobile che estende Facebook facebookapi_php5_restlib.php = classe FacebookRestClient A sua volta FacebookRestClient utilizza jsonwapper
  • 70. Facebook PHP Framework Internal Web Application – struttura require_once 'facebook.php'; $appapikey = ' 4e4b147cab0bf4f47032f2e7c4ae1680 '; $appsecret = ' 76c0f4ee6365bd7902a2f72ed89deca3 '; $facebook = new Facebook ($appapikey, $appsecret); $user_id = $facebook->require_login(); echo &quot;<br>&quot;; echo &quot;<br>apikey: $appapikey&quot;; echo &quot;<br>appsec: $appsecret&quot;; echo &quot;<br>session key: &quot; . $_POST[&quot;fb_sig_session_key&quot;] ;
  • 71. Facebook PHP Framework Internal Web Application – partiamo con PHP // Greet the currently logged-in user! echo &quot;<p>Ciao <fb:name uid='$user_id' useyou='false' /> !</p>&quot;; // Stampa i primi 5 amici e li conta $friends = $facebook->api_client->friends_get(); echo &quot;<p>Hai ben &quot; .count($friends) .&quot; amici</p>&quot;; $friends = array_slice($friends, 0, 5); foreach ($friends as $friend) { echo &quot;$friend: <fb:profile-pic size='square' uid='$friend' facebook-logo='true'> </fb:profile-pic>&quot;; }
  • 72. Facebook PHP Framework Internal Web Application – friends_get
  • 73. Facebook PHP Framework Internal Web Application – partiamo con PHP $query = &quot;select name, birthday_date from user where uid in (SELECT uid2 FROM friend WHERE uid1=&quot; .$facebook->get_loggedin_user() .&quot;)&quot;; $result = $facebook->api_client->fql_query( $query ); foreach ($result as $friend) { if( !(strpos( $friend[&quot;birthday_date&quot;], &quot;/1971&quot; )==false) ) echo &quot;<br>&quot; .$friend[&quot;name&quot;] .&quot; - &quot; .$friend[&quot;birthday_date&quot;]; }
  • 74. Facebook PHP Framework Web Application – FBML Facebook utilizza FBML per inserire comandi FBML (un'estensione di HTML) all'interno di pagine HTML, di siti connessi a Facebook o all'interno di applicazioni iframe. I comandi FBML sono estensioni a PHP disponibili in opensource, all'interno dell'SDK Facebook open Platform Le aree coperte dai FBML sono : Tools, User/Groups, Notifications and Requests, Platform Internationalization, Deprecated, Status Messages, Page Navigation, Wall, Visibility on Profile, Profile-specific, Misc, Editor Display, Embedded Media, Dialog, Additional Permissions, Social Widgets, Message Attachments, Forms <fb:name uid='$user_id' useyou='false' /> <fb:profile-pic size='square' uid='$friend' facebook-logo='true'></fb:profile-pic> <fb:comments numposts=&quot;4&quot; title=&quot;Commenta la mia applicazione&quot; xid=&quot;principale&quot;></fb:comments>
  • 75. Facebook PHP Framework FQL - Facebook Query Language FQL - Facebook Query Language Il Facebook Query Language, o FQL, permette di usare una interfaccia SQL like per interrogare facilmente le informazioni presenti all'interno di Facebook (che principalmente risiedono su MySQL e Cassandra) .. assumento che la tua applicazione ne abbia accesso :) Di seguito un elenco delle tabelle interrogabili tramite FQL: album, application, comment, cookies, connection, daily_metrics, developer, event, event_member, family, friend , friend_request, friendlist, friendlist_member, group , group_member, link, link_stat, listing, mailbox_folder, message, metrics, note, notification, page, page_admin, page_fan, permissions, photo, photo_tag, profile, standard_friend_info, standard_user_info, status, stream, stream_filter, thread, translation, user , video, video_tag http://developers.facebook.com/docs/reference/fql/
  • 76. Facebook PHP Framework FQL - Facebook Query Language Oltre di accedere ai campi, FQL si permette di implementare un subset base di funzioni SQL: now() Returns the current time. rand() Generates a random number. strlen(string) Returns the length of the string. concat(string, ...) Concatenates the given strings (can take any number of strings). substr(string, start, length) Gets a substring of the string. strpos(haystack, needle) Returns the position of needle in haystack, or -1 if it is not found. lower(string) Converts the string to lower case. upper(string) Converts the string to upper case. strip_tags(field) Strips HTML markup and encoding from a specified FQL field.
  • 77. Facebook PHP Framework FQL Leggiamo i profili di Matteo Baccan (543107502) e Beppe Grillo (510445092) SELECT name,pic_square_with_logo,uid from user WHERE uid IN (510445092,543107502) https://api.facebook.com/method/fql.query?query=<QUERY>
  • 78.
  • 79. Facebook restituisce il risultato Il alcuni casi occorre autenticare la chiamata verso Facebook Le applicazioni richiedono invece l'API Key e talvolta la Private Key Normalmente le librerie client REST fanno la maggior parte del lavoro :) REST API (obsolete)
  • 80. Facebook PHP Framework * Administrative Methods * Login/Auth Methods * Data Retrieval Methods (FQL) * Publishing Methods * Facebook Connect Methods * Mobile Methods * Photos API Methods * Events API Methods * Custom Tags API Methods Ma quali sono i metodi che implementano le API REST?
  • 81. Facebook PHP Framework FQL - Facebook Query Language FQL – via REST API Le chiamate FQL, sono chiamate all'API fql.query
  • 82. Facebook PHP Framework FQL - Facebook Query Language FQL – via REST API Le chiamate FQL, sono chiamate all'API fql.query
  • 83.
  • 84. Add Developer App http://www.facebook.com/developers
  • 92. Il materiale presentato http://www.baccan.it
  • 94. Facebook PHP Framework Matteo Baccan lovecat [email_address]