This week, we outlined the results that developers are seeing when using the Open Graph. We also announced the next round of submissions for our Preferred Developer Consultant Program.
Today we are adding a new migration that deals with how the Graph API passes exception information. This migration is available on the Advanced tab in the Developer App. Previously, errors would take the format:
{"error_code": "", "error_description": ""}With the migration enabled, it will now be formatted in line with the rest of the Graph API
{"error": {"message": "", "type": ""}}
Any apps created from today will automatically have this migration enabled.
Two weeks ago, we announced the ability to access questions asked by a user via the Graph API. This week we’ve added the ability to access Questions asked using a Page. The following is an example of how to get the questions a Page has asked:
<?php $page_id = 'YOUR_PAGE_ID'; $app_id = 'YOUR_APP_ID'; $app_secret = 'YOUR_APP_SECRET'; $my_url = 'YOUR_URL'; $code = $_REQUEST["code"]; echo '<html><body>'; if (!$code) { // Getting a page's questions requires an access_token, so get one $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . urlencode($my_url) . "&scope=user_questions,friends_questions"; echo('<script>top.location.href="' . $dialog_url . '";</script>'); } else { $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&redirect_uri=" . urlencode($my_url) . "&client_secret=" . $app_secret . "&code=" . $code; $access_token = file_get_contents($token_url); $questions = "https://graph.facebook.com/" . $page_id . "/questions?" . $access_token; $response = file_get_contents($questions); echo '<pre>'; print_r(json_decode($response)); echo '</pre>'; } echo '</body></html>'; ?>
As we announced previously (via a banner at the top of App Profile Pages), we removed the Reviews and Discussions apps from App Profile Pages this Tuesday. Please remember to remove in-app references to the Reviews and Discussion apps.
At f8 we launched Open Graph tools in the Developer App that allows the creation of Open Graph actions and aggregations. At the time we also gave access to Timeline for developers of Open Graph Apps only so that they could start testing in advance of the launch of Timeline to all users.
At this time, you can submit your actions for approval but we will not approve any actions until we launch Timeline to a good percentage of our users. We will, however, reject actions that fail to meet our criteria earlier to allow you to make any updates or changes that are requested. If your actions are rejected you will receive an email asking you to correct and resubmit.
To find out more about using the Open Graph, you can see all the recorded sessions from f8, as well our recent Mobile Hack at https://developers.facebook.com/videos/.
As always, you should check the roadmap to make sure your apps will not be affected by any upcoming breaking changes.
Upcoming breaking changes on December 1, 2011:
1. OAuth spec migration
In order to be compliant with the OAuth spec we have made changes to our auth APIs. As part of this update, we will be deprecating 'code_and_token
' and need developers to use 'code%20token
'. Everything is identical, just replace '_and_
' with encoded <space> '%20
'.
2. Deprecating Dashboard APIs
These APIs are no longer supported and will not be available past this date. This does not include the Dashboard count APIs which will deprecate on the FBML and Request 1.0 schedule (no support past Jan 1st 2012, and removed June 1st 2012.
3. Apps on Facebook: FB.Canvas.getPageInfo must be called with callback
The FB.Canvas.getPageInfo method will have to be called with a callback function. This was previously not required. See this blog post for more information.
4. Removing Bookmark URL
As mentioned here, this optional field was originally created to help developers track user referrals from app bookmarks. We now pass a ref parameter to let you know that the user is coming from a bookmark (i.e., ref=bookmarks). As a result, we removed Bookmark URL. While many developers left this field blank (defaulting to the Canvas URL), it recently came to our attention that some developers were using this field to redirect to Pages with the Page Tab app installed. We will restore the Bookmark URL to the Advanced tab under Canvas Settings for 90 days. This gives you time to edit the field before it will be removed from the Developer App. To give you the most flexibility, we recommend that you delete the Bookmark URL field and instead detect the ref=bookmarks parameter when the user visits your app and take the appropriate action (either redirect to your Page Tab app on a Page or show the user something different).
Activity on facebook.stackoverflow.com this week: