35
Open Graph on Mobile Leveraging the Open Graph on Native & HTML Apps Bruce Hazan March th md

Facebook - Open Graph on Mobile

Embed Size (px)

DESCRIPTION

Presentation at http://www.mobile-monday.de/events/kick-ass-m2d2-developing-facebook-html5-mobile-games-apps

Citation preview

Page 1: Facebook - Open Graph on Mobile

Open Graph on MobileLeveraging the Open Graph on Native & HTML! Apps

Bruce HazanMarch !"th #$!#m#d#

Page 2: Facebook - Open Graph on Mobile

800m+Monthly

Users

0.5bnDailyUsers

7mSites & Apps

Facebook on the web

Page 3: Facebook - Open Graph on Mobile

Facebook on mobile

2004 2005 2006 2007 2008 2009 2010 2012

!"#m+

2xEngagement

Page 4: Facebook - Open Graph on Mobile

LISTEN

READ

RUN

EAT

Like

Like

Like

Like

Page 5: Facebook - Open Graph on Mobile
Page 6: Facebook - Open Graph on Mobile
Page 7: Facebook - Open Graph on Mobile
Page 8: Facebook - Open Graph on Mobile

The Guardian

$ to $.%+ million Monthy Active Users in % months

Page 9: Facebook - Open Graph on Mobile

GoodReads

&&' increase in Daily Active Users

Page 10: Facebook - Open Graph on Mobile

Pinterest

()' increase in daily referrals from Facebook

Page 11: Facebook - Open Graph on Mobile

Open Graph

Desktop Web App

Desktop Web

Mobile Web

Desktop Web App

Desktop Web

Mobile Web

Native Apps Native Apps

Page 12: Facebook - Open Graph on Mobile

▪ Play a Sound▪ Like a Sound▪ Post a Sound▪ Follow a User▪ Join a Group

Page 13: Facebook - Open Graph on Mobile

Publish Actions from every platform

Desktop Web App

Page 14: Facebook - Open Graph on Mobile

Desktop Web: Newsfeed and Ticker

Page 15: Facebook - Open Graph on Mobile

Desktop Web: Timeline

Page 16: Facebook - Open Graph on Mobile

Desktop Web: Timeline App Views

Page 17: Facebook - Open Graph on Mobile

iOS Native: Newsfeed & Timeline

Page 18: Facebook - Open Graph on Mobile

iOS Native: Newsfeed & Timeline

Page 19: Facebook - Open Graph on Mobile

Android Native & Mobile Web: Newsfeed & Timeline

Page 20: Facebook - Open Graph on Mobile

ACTION OBJECT

!. Model your data

Page 21: Facebook - Open Graph on Mobile

!. Model your data

Page 22: Facebook - Open Graph on Mobile

". Design your Timeline Aggregations

Page 23: Facebook - Open Graph on Mobile

#. Markup and expose your objects to the Web

Page 24: Facebook - Open Graph on Mobile

curl -F 'access_token=<access_token>' -F 'recipe=http://myapp.com/object_id' \ 'https://graph.facebook.com/me/myapp:cook'

Object URL Action Name

$. Publish Actions from every platform

Page 25: Facebook - Open Graph on Mobile

▪ if the user has authorised your app:

▪ If the user has not authorised your app:

fb[APP_ID]://authorize# expires_in=[ACCESS_TOKEN_EXPIRATION]& access_token=[USER_ACCESS_TOKEN]& target_url=[ORIGINAL_LINK]

fb[APP_ID]://authorize# target_url=[ORIGINAL_LINK]

iOS Deep Linking

Page 26: Facebook - Open Graph on Mobile

% Pro Tips for OG Ninjas

Page 27: Facebook - Open Graph on Mobile

▪ Auto-login returning auth’d userson Desktop Web and Mobile Web:

▪ Prominently offer:

▪ EnableAuthenticatedReferrals

!. Authentication really, really matters

FB.getLoginStatus()

Page 28: Facebook - Open Graph on Mobile

". Trim your permissions

publish_stream

offline_accesspublish_actions

DEPRECATED

SUPERCEDED

Page 30: Facebook - Open Graph on Mobile

INGRE-DIENT

INGRE-DIENT

INGRE-DIENT

$. Use Action and Object References

RECIPECOOK

<meta property=”APP_NAMESPACE:REFERENCE_OBJECT_TYPE” content=”REFERENCE_OBJECT_URL”/>

Page 31: Facebook - Open Graph on Mobile

&. er, what about: http://example.com/#!/foo/bar

▪ OG needs ‘real’ URLs:

▪ Keep the address bar clean:

▪ redirect based on theuseragent string, or JS

▪ support coming soon...

http://example.com/foo/bar

window.history.pushState()

“facebookexternalhit”

window.location=”/!#/foo/bar”

_escaped_fragment_

Page 32: Facebook - Open Graph on Mobile

'. Read Data -> Better Personalisation

user_actions.musicuser_actions.videouser_actions.news

user_actions:APP_NAMESPACEuser_actions:soundcloud

friends_actions.musicfriends_actions.videofriends_actions.news

friends_actions:APP_NAMESPACEfriends_actions:soundcloud

https://graph.facebook.com/UID/music.listens?access_token=TOKENhttps://graph.facebook.com/UID/news.reads?access_token=TOKENhttps://graph.facebook.com/UID/video.watches?access_token=TOKEN

https://graph.facebook.com/UID/APP_NAMESPACE:ACTION_NAMEhttps://graph.facebook.com/UID/soundcloud:favorite

Page 33: Facebook - Open Graph on Mobile

%. Update your objects programmatically

curl -F 'scrape=true' -F 'id=http://myapp.com/object_id' \ 'https://graph.facebook.com/'

Note:▪ No domain-level refresh - you have to ping object-by-object▪ No API to show all the objects Facebook knows about ▪ Use the Graph Batch API to speed things up

Page 34: Facebook - Open Graph on Mobile

Open Graph

Desktop Web App

Desktop Web

Mobile Web

Desktop Web App

Desktop Web

Mobile Web

Native Apps Native Apps

Page 35: Facebook - Open Graph on Mobile

Hack the Graph

Simon’s Food Apphttp://tinyurl.com/simonsfoodapp

OG Documentationdevelopers.facebook.com/docs/opengraph

Wishlist (Official Sample App)https://github.com/facebook/wishlist-mobile-sample

facebook.com/sicross