One graph to rule them all - Facebook

35
One Graph to rule them all Integrating your application with

description

See more information on http://itnig.net/en/events

Transcript of One graph to rule them all - Facebook

Page 1: One graph to rule them all - Facebook

One Graph to rule them all

Integrating your application with

Page 2: One graph to rule them all - Facebook

Cristian PlanasCTO of

Follow me on Twitter: @cristianplanas

Page 3: One graph to rule them all - Facebook

¿How to publish actions in the Open

Graph?

Page 4: One graph to rule them all - Facebook

1. Get a wrapper

gem install koala

Page 5: One graph to rule them all - Facebook

2. Get access to the user’s graph

graph = Koala::Facebook::API.new(user_token)

Page 6: One graph to rule them all - Facebook

3. Publish your action!

graph.put_connections("me", ”my action name", :my_object=> my_object_url)

Page 7: One graph to rule them all - Facebook
Page 8: One graph to rule them all - Facebook

Not so fast!

Page 9: One graph to rule them all - Facebook

¿What is the Open Graph?

Page 10: One graph to rule them all - Facebook
Page 11: One graph to rule them all - Facebook
Page 12: One graph to rule them all - Facebook

Elements of the Open Graph

Page 13: One graph to rule them all - Facebook

The User

Page 14: One graph to rule them all - Facebook

Asking for permissions: publish_actions

Page 15: One graph to rule them all - Facebook

Merging with publish_stream

publish_stream permits you to write in the user’s wall.

Now publish_actions include “basic” capabilities of publish_stream.

Facebook is trying to simplify its permission system.

Page 16: One graph to rule them all - Facebook

The Object

Page 17: One graph to rule them all - Facebook

Define the object with metatags

og:url

og:title

og:description

og:image

og:type

Page 18: One graph to rule them all - Facebook

Using the object URL as a landing

Page 19: One graph to rule them all - Facebook

A typical issue: caching

Facebook caches the URL of the objects.

Facebook Debugger cleans the cache. Use it!

Page 20: One graph to rule them all - Facebook

The Action

Page 21: One graph to rule them all - Facebook

The easy way: built-in Actions

Follow

Like

Listen

Read

Watch

Page 22: One graph to rule them all - Facebook

Better create your own!

Page 23: One graph to rule them all - Facebook

Publishing your actions

Client-side: Facebook Javascript SDK

Server-side: Choose your wrapper!

Server-side & Background: Sidekiq, Resque...

Page 24: One graph to rule them all - Facebook

Fb_graph

Meanwhile, in Ruby…

Page 25: One graph to rule them all - Facebook

Surviving Facebook Review

Page 26: One graph to rule them all - Facebook

Translating your action

Page 27: One graph to rule them all - Facebook

¿Why the Open Graph?

Page 28: One graph to rule them all - Facebook
Page 29: One graph to rule them all - Facebook
Page 30: One graph to rule them all - Facebook

Alternatives

Page 31: One graph to rule them all - Facebook

Scores

Pretty good choice in simple, “closed” games.

Page 32: One graph to rule them all - Facebook

Achievements

Every achievement has points associated.

A game has 1000 points to distribute across all the achievements.

The visibility of the achievement depends of the points.

Page 33: One graph to rule them all - Facebook

Publishing in the wall

Page 34: One graph to rule them all - Facebook

Things to remember

Open Graph is really simple to use.

Just adapt your application to Facebook way of life.

Greatly improves your visibility.

Page 35: One graph to rule them all - Facebook

Now it’s true.