Professional Documents
Culture Documents
Glue Con
May 27th, 2010
Monica Keller
If you take a user as the central object then their connections are their photos, videos, status updates,friends, etc
Querying the Graph API
https://graph.facebook.com/ciberch/friends?
access_token=xxx
"data": [
{
"name": "Amber Reyngoudt",
"id": "988928928928"
},
{
"name": "Ari Steinberg",
"id": "33049"
}
...
]
Because our graph is so rich think of the power of using this social data to build you service
Subscribing to get updates
A hypothetical example
Here is an example of how Spotify or a service like it could benefit from using the realtime api to help their users discover content in real time inside their application.
Wednesday, June 2, 2010
Spotify is a music service which allows users to play music from a desktop application. Today you can share music you like with your friends on Facebook.
Creating the subscription
A hypothetical example
1) POST /APP_ID/subscriptions
1) POST /APP_ID/subscriptions
POST /APP_ID/subscriptions HTTP/1.1
host: graph.facebook.com
access_token=kawaiEJWUC2gLaanGfKy
object=userfields=friendscallback_url=http%2A%2F
%2Fwww.spotify.com%2Fsubs
verify_token=oh29hlq
1) POST /APP_ID/subscriptions
{"object": "user",
"entry":
[ "uid": 608201527, "changed_fields": [
"friends" ],
"time": 1274903155
]
}
After this request, an outgoing call is made to the graph api passing the user’s access token
Note: the real-time updates are server to server only. To push to the client developers can use existing connections.
Wednesday, June 2, 2010
Push the changes from Spotify Server to Spotify client and the user will not need to close and re open the app to see their new friend.
Note: the real-time updates are server to server only. To push to the client developers can use existing connections.
Wednesday, June 2, 2010
Shows how new content is being discovered via my friends in real
time
Wednesday, June 2, 2010
2 Data formats
3 Synchronization directives
Email:
Monica Keller
ciberch@facebook.com