19. 3. Publish Actions
POST https://graph.facebook.com/me/foodapp:cook
access_token=234876AB6865...
&
recipe=http://mysite.com/lasagne
Thursday, October 18, 12
20. 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
Thursday, October 18, 12
21. 4. Define your Aggregations
Text
Thursday, October 18, 12
22. Walkthrough
▪ Creating Your First App
▪ Creating Objects and Actions
▪ Permissions and Authentication
▪ Development Tools and Tips
Thursday, October 18, 12
27. Field Expansion
GET https://graph.facebook.com/me?
fields=albums.limit(5)
.fields(name,photos.limit(2)
.fields(name, picture, tags.limit(2)))
https://developers.facebook.com/docs/reference/api/field_expansion/
Thursday, October 18, 12
28. Take advantage of Built-In Objects and Actions
Thursday, October 18, 12
30. User Intent
POST https://graph.facebook.com/me/foodapp:cook
access_token=234876AB6865...
&
recipe=http://mysite.com/lasagne
&
fb:explicitly_shared=true
Thursday, October 18, 12
31. Let users add their own photos
Thursday, October 18, 12
32. Let users add their own photos
POST https://graph.facebook.com/me/cookbook:cook?
recipe=http://www.yourdomain.com/pizza.html&
image[0][url]=http://www.yourdomain.com/images/pizza_by_bear.jpg&
image[0][user_generated]=true&
image[1][url]=http://www.yourdomain.com/images/soda_by_bear.jpg&
image[1][user_generated]=true&
access_token=YOUR_ACCESS_TOKEN
https://developers.facebook.com/docs/opengraph/usergeneratedphotos/
Thursday, October 18, 12
33. Add places to Open Graph stories
POST https://graph.facebook.com/me/recipebox:cook?
recipe=http://www.example.com/pizza.html&
Text
place=108424279189115&
access_token=YOUR_ACCESS_TOKEN
https://developers.facebook.com/docs/opengraph/location_tagging/
Thursday, October 18, 12
34. Tag friends
POST https://graph.facebook.com/me/cookbook:cook?
recipe=http://www.example.com/pizza.html&
tags=499804870&
access_token=YOUR_ACCESS_TOKEN
https://developers.facebook.com/docs/opengraph/actions
Thursday, October 18, 12
36. Localize
https://developers.facebook.com/docs/opengraph/internationalization/
Thursday, October 18, 12
37. Text
<meta property="og:locale"
GET
content="en_US"/>
http://mysite.com/mango
<meta property="og:locale:alternate"
content="id_ID"/>
<meta property="og:title"
content="Mango"/>
<meta property="og:locale"
content="id_ID"/> GET
<meta property="og:locale:alternate" http://mysite.com/mango?
content="en_US"/> fb_locale=id_ID
<meta property="og:title"
content="Mangga"/>
Thursday, October 18, 12
38. Update your objects programmatically
POST https://graph.facebook.com
access_token=234876AB6865...
&
id=http://mysite.com/lasagne
&
scrape=true
Thursday, October 18, 12
39. Avoid Policy Pitfalls
Did the user know?
Apps should not post for passive content consumption
Action tagging can only be used if users are interacting in the app
Don’t pre-fill messages that post to the user’s timeline
Branding Text
Should match your app’s, not Facebook’s
Ace Your OG Review
Give detailed usage instructions to reproduce the action from the user’s POV
Make sure your actions and stories appear in grammatical English
Explain when the user should expect to see a story published
https://developers.facebook.com/policy/
Thursday, October 18, 12
40. Native Apps Native Apps
Mobile Web
Mobile Web
Open Graph
Desktop Web Desktop Web
Desktop Web App Desktop Web App
Thursday, October 18, 12