One graph to rule them all - Facebook
description
Transcript of One graph to rule them all - Facebook
One Graph to rule them all
Integrating your application with
Cristian PlanasCTO of
Follow me on Twitter: @cristianplanas
¿How to publish actions in the Open
Graph?
1. Get a wrapper
gem install koala
2. Get access to the user’s graph
graph = Koala::Facebook::API.new(user_token)
3. Publish your action!
graph.put_connections("me", ”my action name", :my_object=> my_object_url)
Not so fast!
¿What is the Open Graph?
Elements of the Open Graph
The User
Asking for permissions: publish_actions
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.
The Object
Define the object with metatags
og:url
og:title
og:description
og:image
og:type
Using the object URL as a landing
A typical issue: caching
Facebook caches the URL of the objects.
Facebook Debugger cleans the cache. Use it!
The Action
The easy way: built-in Actions
Follow
Like
Listen
Read
Watch
Better create your own!
Publishing your actions
Client-side: Facebook Javascript SDK
Server-side: Choose your wrapper!
Server-side & Background: Sidekiq, Resque...
Fb_graph
Meanwhile, in Ruby…
Surviving Facebook Review
Translating your action
¿Why the Open Graph?
Alternatives
Scores
Pretty good choice in simple, “closed” games.
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.
Publishing in the wall
Things to remember
Open Graph is really simple to use.
Just adapt your application to Facebook way of life.
Greatly improves your visibility.
Now it’s true.