May 2011
Beginner
408 pages
10h 27m
English
The Applications and Games Dashboard is where you can go to get updates on all the applications and games that you and your friends are using. This is the place that you, as a developer or application owner, can update your users with new news about your application. You can use a series of APIs. Below, I show the code you could use (in PHP) to add news to your application on the Dashboard (taken from http://developers.facebook.com/docs/guides/canvas/#dashboards):
$news = array(array('message' => 'Come back and see our new quotes'));
$result = json_decode(file_get_contents(
'https://api.facebook.com/method/dashboard.addNews?' .
'news=' . urlencode(json_encode($news)) .
'&format=json&access_token=' .
$cookie['oauth_access_token'])); // this cookie is assuming you got their
access token elsewhere and have stored it for future access
The result looks like Figure 4-11 in your Applications and Games Dashboard.
Figure 4-11: Updates to your Applications and Games Dashboard look similar to this.

Read now
Unlock full access