Slide 1

Slide 1 text

OpenSocial 2.0 - Viva la Open App Revolution @BastianHofmann

Slide 2

Slide 2 text

Your web application

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Questions? Ask!

Slide 9

Slide 9 text

http://speakerdeck.com/u/bastianhofmann

Slide 10

Slide 10 text

http://www.opensocial.org/

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

http://www.opensocial.org/

Slide 28

Slide 28 text

A set of APIs to access the social graph of users I.

Slide 29

Slide 29 text

A specification for including 3rd party applications (gadgets) into social services II.

Slide 30

Slide 30 text

http://www.opensocial.org/ Foundation

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

GADGET apivz.net CONTAINER meinvz.net

Slide 34

Slide 34 text

Container vz.net Gadget apivz.net HTTP GET apivz.net/gadgets/render? xml=.... Shindig apivz.net (II.)

Slide 35

Slide 35 text

Container vz.net Gadget apivz.net HTML Page with OpenSocial JavaScript API Shindig apivz.net (II.)

Slide 36

Slide 36 text

Container vz.net Gadget apivz.net Ajax Requests to API Shindig apivz.net (I.)

Slide 37

Slide 37 text

External Page yourclient.com Shindig apivz.net HTTP (I.)

Slide 38

Slide 38 text

Container vz.net Gadget apivz.net Gadget Backend api.twitter.com Ajax

Slide 39

Slide 39 text

Same Origin Policy

Slide 40

Slide 40 text

Container vz.net Gadget apivz.net Gadget Backend api.twitter.com Ajax

Slide 41

Slide 41 text

Container vz.net Gadget apivz.net Gadget Backend api.twitter.com Shindig apivz.net Ajax

Slide 42

Slide 42 text

Container vz.net Gadget apivz.net Gadget Backend api.twitter.com Shindig apivz.net Ajax HTTP

Slide 43

Slide 43 text

Container vz.net Gadget apivz.net Gadget Backend api.twitter.com Shindig apivz.net Ajax HTTP Owner ID Viewer ID OAuth Signature

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Container vz.net Gadget apivz.net Not Allowed

Slide 46

Slide 46 text

Same Origin Policy

Slide 47

Slide 47 text

Container vz.net Gadget apivz.net Message - window.postMessage - Iframes with relay files - Flash bridge JavaScript RPC

Slide 48

Slide 48 text

Features

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Views

Slide 51

Slide 51 text

CANVAS

Slide 52

Slide 52 text

PROFILE

Slide 53

Slide 53 text

POPUP

Slide 54

Slide 54 text

GROUP

Slide 55

Slide 55 text

PREVIEW

Slide 56

Slide 56 text

Let‘s start programming

Slide 57

Slide 57 text

http://www.partuza.nl/ https://github.com/bashofmann/partuza

Slide 58

Slide 58 text

https://github.com/bashofmann/statusnet_gadget_2nd

Slide 59

Slide 59 text

DEMO

Slide 60

Slide 60 text

var html="
    "; for (var i=0; i < viewers.length; i++) { html += "
  • " + viewers[i].displayName + "
  • "; } html += "
      "; document.getElementById("div").innerHTML = html; Where is the error?

Slide 61

Slide 61 text

Templates

Slide 62

Slide 62 text

DEMO

Slide 63

Slide 63 text

REST API

Slide 64

Slide 64 text

GET /rest/people/34KJDCSKJN2HHF0DW20394/@self? fields=name,gender&format=xml HTTP/1.1 HOST api.example.org Authorization: hh5s93j4hdidpola HTTP/1.1 200 OK Content-Type: text/xml 34KJDCSKJN2HHF0DW20394 Jane Doe female

Slide 65

Slide 65 text

• People • Activities • AppData • Messages • MediaItems • Albums • Groups

Slide 66

Slide 66 text

DEMO

Slide 67

Slide 67 text

Authorization

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

lanyrd.com twitter.com Pre Registration of Client at Twitter: - Shared Consumer Key - Shared Consumer Secret

Slide 70

Slide 70 text

HTTP POST Connect with Twitter lanyrd.com

Slide 71

Slide 71 text

twitter.com HTTP POST Connect with Twitter HTTP GET Consumer Key Redirect URI Signature (Consumer Secret) lanyrd.com

Slide 72

Slide 72 text

twitter.com HTTP POST Connect with Twitter Request Token Request Token Secret lanyrd.com

Slide 73

Slide 73 text

http://twitter.com/authorize? requestToken=...&consumerKey=... HTTP Redirect lanyrd.com

Slide 74

Slide 74 text

HTTP GET twitter.com/ authorize

Slide 75

Slide 75 text

Login twitter.com/ authorize

Slide 76

Slide 76 text

Grant permission twitter.com/ authorize Create verifier and bind it to User and Request Token

Slide 77

Slide 77 text

Redirect URI?verifier=... HTTP Redirect twitter.com/ authorize

Slide 78

Slide 78 text

HTTP GET lanyrd.com (RedirectURI? verifier=...)

Slide 79

Slide 79 text

HTTP GET HTTP GET Consumer Key Verifier Signature (Consumer & Request Token Secret) twitter.com lanyrd.com

Slide 80

Slide 80 text

HTTP GET Access Token Access Token Secret twitter.com lanyrd.com

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

http://oauth.net/

Slide 83

Slide 83 text

Web-Server Profile

Slide 84

Slide 84 text

lanyrd.com twitter.com Pre Registration of Client at Twitter: - Shared Client ID - Shared Client Secret - Redirect URI

Slide 85

Slide 85 text

HTTP(S) POST Connect with Twitter lanyrd.com

Slide 86

Slide 86 text

http://twitter.com/authorize?&clientId=... HTTPS Redirect lanyrd.com

Slide 87

Slide 87 text

HTTPS GET twitter.com/ authorize

Slide 88

Slide 88 text

Login twitter.com/ authorize

Slide 89

Slide 89 text

Grant permission twitter.com/ authorize Create authorization code and bind it to User and ClientID

Slide 90

Slide 90 text

Redirect URI?authorizationCode=... HTTPS Redirect twitter.com/ authorize

Slide 91

Slide 91 text

HTTPS GET lanyrd.com (RedirectURI? authorizationCode= ...)

Slide 92

Slide 92 text

HTTPS GET HTTPS GET Consumer Key Authorization Code Consumer Secret twitter.com lanyrd.com

Slide 93

Slide 93 text

HTTPS GET Access Token (Refresh Token) twitter.com lanyrd.com

Slide 94

Slide 94 text

HTTPS GET HTTPS API Request Access Token twitter.com lanyrd.com

Slide 95

Slide 95 text

HTTPS GET HTTPS GET Consumer Key Refresh Token Consumer Secret twitter.com lanyrd.com

Slide 96

Slide 96 text

HTTPS GET Access Token Refresh Token twitter.com lanyrd.com

Slide 97

Slide 97 text

Embedded Experience

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

No content

Slide 100

Slide 100 text

From: [email protected] To: [email protected] Subject: Social Network: Mary Has Commented On Your Status MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="XXXXboundary text" --XXXXboundary text Content-Type: text/html --XXXXboundary text Content-Type: application/embed+json { "gadget" : "http://www.socialnetwork.com/embedded/ commentgadget.xml", "context" : 123 }

Slide 101

Slide 101 text

DEMO

Slide 102

Slide 102 text

Declarative actions

Slide 103

Slide 103 text

No content

Slide 104

Slide 104 text

]]>

Slide 105

Slide 105 text

// Bind javascript function to action ID function mycallback{ ... } var myaction = { id: "org.samplevoip.callbyperson", callback: mycallback } container.actions.updateAction(myaction); ]]>

Slide 106

Slide 106 text

OpenSearch

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

Example Search Realtime Example Search http://search.example.com/ favicon.png UTF-8 http://search.example.com/ ]]>

Slide 109

Slide 109 text

Documentation http://developer.studivz.net/wiki/index.php/ Gadgets_Technical_Documentation http://docs.opensocial.org

Slide 110

Slide 110 text

http://shindig.apache.org/ Integrate it into your site

Slide 111

Slide 111 text

Rate and Comment https://joind.in/talk/view/6080

Slide 112

Slide 112 text

h"p://twi"er.com/Bas2anHofmann h"ps://profiles.google.com/bashofmann h"p://lanyrd.com/people/Bas2anHofmann/ h"p://speakerdeck.com/u/bas2anhofmann [email protected]