Beruflich Dokumente
Kultur Dokumente
Play a Sound
Like a Sound
Post a Sound
Follow a User
Join a Group
Permissions Dialog
Sharing in the app
Publish Actions from every platform
Desktop Web App Desktop Web App
Desktop Web: Newsfeed and Ticker
Desktop Web: Timeline
iOS Native: Newsfeed & Timeline
iOS Native: Newsfeed & Timeline
Android Native & Mobile Web: Newsfeed & Timeline
Steps to using Open Graph
ACTION OBJECT
l. Model your data
2. Markup and expose your objects to the Web
...
<head>
<title>Lasagne</title>
<meta property="og:type" content="foodapp:dish"/>
<meta property="og:title" content="Lasagne"/>
<meta property="og:description" content="yummy"/>
<meta property="og:url" content="http://mysite.com/lasagne"/>
<meta property="og:image" content="http://mysite.com/lasagne.jpg"/>
<meta property="foodapp:ingredient" content="http://mysite.com/beef"/>
<meta property="foodapp:ingredient" content="http://mysite.com/pasta"/>
...
</head>
...
http://mysite.com/lasagne
3. Publish Actions
POST https://graph.facebook.com/me/foodapp:cook
access_token=234876AB6865...
&
recipe=http://mysite.com/lasagne
user performs
action in app
client or server posts action to Facebook
POST https://graph.facebook.com/me/foodapp:cook
access_token=234876AB6865...&
recipe=http://mysite.com/lasagne
Facebook gets the object's metadata
GET http://mysite.com/lasagne
4. Design your Timeline Aggregations
5. Read Actions
GET https://graph.facebook.com/me/foodapp:cook?
access_token=234876AB6865...
Hosting Objects
Enable
Authenticated
Referrals if
appropriate
l. Authentication matters
FB.getLoginStatus()
2. Trim your permissions
publish_stream
offline_access
publish_actions
D
E
P
R
E
C
A
T
E
D
S
U
P
E
R
C
E
D
E
D
3. Upgrade existing users to publish_actions
GET https://graph.facebook.com/me/permissions?
access_token=234876AB6865...
{
"data": [
{
"installed": 1,
"email": 1,
"user_likes": 1
}
]
}
INGRE-
DIENT
INGRE-
DIENT
INGRE-
DIENT
4. Use Object Properties References
RECIPE
COOK
for better Aggregations and Feed stories
...
<head>
<title>Lasagne</title>
<meta property="og:type" content="foodapp:dish"/>
<meta property="og:title" content="Lasagne"/>
<meta property="og:description" content="yummy"/>
<meta property="og:url" content="http://mysite.com/lasagne"/>
<meta property="og:image" content="http://mysite.com/lasagne.jpg"/>
<meta property="foodapp:ingredient" content="http://mysite.com/beef"/>
<meta property="foodapp:ingredient" content="http://mysite.com/pasta"/>
...
</head>
...
OCCASION
5. Use Action Properties & References
RECIPE
COOK
for better Aggregations and Feed stories
POST https://graph.facebook.com/me/foodapp:cook
access_token=234876AB6865...
&
recipe=http://mysite.com/lasagne
&
occasion=http://mysite.com/mybirthday
TAGS
6. Tag People & Places; Add Messages
RECIPE
COOK
POST https://graph.facebook.com/me/myapp:cook
access_token=234876AB6865...
&
recipe=http://mysite.com/lasagne
&
place=56783456736519
&
tags=12345,67889
&
message=Even+Garfield+would+be+proud
7. URL structure