Smau Roma 2012 Mob App Camp put social in your app

31
gg.mm.aa PUT Social in your Application Michele Piunti [email protected] Reply Whitehall

description

PUT Social in your Application

Transcript of Smau Roma 2012 Mob App Camp put social in your app

Page 1: Smau Roma 2012 Mob App Camp put social in your app

gg.mm.aa

PUT Social in your Application Michele Piunti

[email protected]

Reply Whitehall

Page 2: Smau Roma 2012 Mob App Camp put social in your app

2

Outline

• Open API, Social Plug In

• Tecnologie, Protocolli e Meccanismi

• Esempi

Page 3: Smau Roma 2012 Mob App Camp put social in your app

3

Open API

Mettono in comunicazione Persone,

Devices e Applicazioni, in un unico

ecosistema integrato

The adoption of Amazon Web Services is currently driving more network activity than everything Amazon does

through their traditional Web sites Jef Bar (Amazon evangelist) / Dion Hincliffe (Journalist)

60% of all listings on eBay are added via their API's - and eBay services over 6 billion API calls per month

John Musser (Programmable Web)

The API which has easily 10 times more traffic than the web site, has been really very important to us

Biz Stone (co-founder Twitter)

Page 4: Smau Roma 2012 Mob App Camp put social in your app

4

A chi serve un API ?

• Make money 60% of all listings on eBay.com added via their APIs

• Save money SmugMug saves > $500K/year with Amazon S3 Storage

• Build brand Google Maps 300% growth vs 20% MapQuest

• Move to the cloud Over 50% of all transactions via their API

• Go anywhere Netflix now exploitable on over 200 devices

fonte ProgrammableWeb.com

Page 5: Smau Roma 2012 Mob App Camp put social in your app

5

Club of Billionaire

Page 6: Smau Roma 2012 Mob App Camp put social in your app

6

Open API

Crescita Esponenziale delle open API

Oggi: 923 Social API

(fonte: www.ProgrammableWeb.com )

8 anni per arrivare a 1000 API globali, oggi

7000 circa

Tasso 7x dal 2010 a oggi per le API di Social

Media Platform

Page 7: Smau Roma 2012 Mob App Camp put social in your app

7

Portabilità

Un sistema API può supportare centinaia di dispositivi

Page 8: Smau Roma 2012 Mob App Camp put social in your app

8

Interoperabilità

Page 9: Smau Roma 2012 Mob App Camp put social in your app

9

Open API

• Spesso non si tratta di estensioni di un prodotto, ma “del”

prodotto stesso

Page 10: Smau Roma 2012 Mob App Camp put social in your app

10

Tecnologie Protocolli

e Meccanismi

Page 11: Smau Roma 2012 Mob App Camp put social in your app

11

Protocolli e Meccanismi (I)

Page 12: Smau Roma 2012 Mob App Camp put social in your app

12

Protocolli e Meccanismi (II)

Page 13: Smau Roma 2012 Mob App Camp put social in your app

13

Twitter REST API

• API pubbliche basate su Web Services di tipo REST

– Raggiungibili tramite

un URL e un metodo HTTP

– Risposte in formati:

json, xml ,rss, atom

AZIONE

Page 14: Smau Roma 2012 Mob App Camp put social in your app

14

Esempio (II) Twitter REST API

JSON Format

Page 15: Smau Roma 2012 Mob App Camp put social in your app

15

Facebook Open Graph

• Estensione del Social Graph (2010)

• Ogni nodo è riferito da un ID unico raggiungibile via web – https://graph.facebook.com/19292868552

• Open Graph protocol, include:

– Applicazioni web e pagine esterne

– Azioni e oggetti creati da applicazioni

esterne

• Obiettivo:

– Abilitare applicazioni esterne verso una “deep integration into the

Facebook experience”.

Page 16: Smau Roma 2012 Mob App Camp put social in your app

16

Facebook Open Graph Protocol

E’ possibile creare nuove azioni e registrarle :

1. Approvazione di una open graph “Action” dell’ applicazione

2. Le azioni degli utenti dell’ applicazione saranno riconosciute come eventi FB e riportate nel flusso user timeline

An App event “count-as” a Facebook event

Page 17: Smau Roma 2012 Mob App Camp put social in your app

17

Timeline

Page 18: Smau Roma 2012 Mob App Camp put social in your app

18

Esempi

• Social Plug In • Workflow B2B (Machine-to-Machine)

Page 19: Smau Roma 2012 Mob App Camp put social in your app

19

Pulsanti: Twitter

<a href="https://twitter.com/share"

class="twitter-share-button" data-

lang="it">Tweet</a>

<script>!function(d,s,id){var

js,fjs=d.getElementsByTagName(s)[0];if(!

d.getElementById(id)){js=d.createElement

(s);js.id=id;js.src="//platform.twitter.

com/widgets.js";fjs.parentNode.insertBef

ore(js,fjs);}}(document,"script","twitte

r-wjs");</script>

https://twitter.com/about/resources/buttons

Page 20: Smau Roma 2012 Mob App Camp put social in your app

20

Pulsanti: G+

<g:plusone annotation="inline"></g:plusone>

<script type="text/javascript">

(function() {

var po = document.createElement('script');

po.type = 'text/javascript'; po.async = true;

po.src =

'https://apis.google.com/js/plusone.js';

var s =

document.getElementsByTagName('script')[0];

s.parentNode.insertBefore(po, s);

})();

</script>

http://www.google.com/intl/it/webmasters/+1/button/index.html

Page 21: Smau Roma 2012 Mob App Camp put social in your app

21

Pulsanti: Facebook Like

https://developers.facebook.com/docs/reference/plugins/like/

Page 22: Smau Roma 2012 Mob App Camp put social in your app

22

Social Plugins

Page 23: Smau Roma 2012 Mob App Camp put social in your app

23

Sviluppo di una Applicazione

• - Spring Social: branch del progetto Spring, framework di sviluppo basato su J2EE

• - Connect Social Providers as a Service (SaaS)

L’applicazione presentata è disponibile su: https://github.com/MPiunti/SocialAPP

Page 24: Smau Roma 2012 Mob App Camp put social in your app

24

OAuth Token

Page 25: Smau Roma 2012 Mob App Camp put social in your app

25

Social Config

Page 26: Smau Roma 2012 Mob App Camp put social in your app

26

Connection Interfaces

Page 27: Smau Roma 2012 Mob App Camp put social in your app

27

Identities

Page 28: Smau Roma 2012 Mob App Camp put social in your app

28

Twitter Timeline Controller

Page 29: Smau Roma 2012 Mob App Camp put social in your app

29

Trends Controller

Page 30: Smau Roma 2012 Mob App Camp put social in your app

30

Facebook Controller

Page 31: Smau Roma 2012 Mob App Camp put social in your app

gg.mm.aa

PUT Social in your Application

Michele Piunti

[email protected]

Reply Whitehall