This week, we published Internationalizing Open Graph Apps, Bringing Facebook Platform to Android Devices and are announcing the following changes:
Uploading videos to Events via Graph API
You can now upload videos to events. Events must be public (similar to uploading videos to groups). To publish a video, issue a POST
request with the video file attachment as multipart/form-data to https://graph-video.facebook.com/EVENT_ID/videos
. Here’s a simple PHP example:
<?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "THIS_FILE_URL"; $video_title = "VIDEO_TITLE"; $video_desc = "VIDEO_DESCRIPTION"; $event_id = "YOUR_EVENT_ID"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . urlencode($my_url) . "&scope=publish_stream"; echo("<script?>top.location.href='" . $dialog_url . "'</script?>"); } $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); $post_url = "https://graph-video.facebook.com/$event_id/videos?" . "title=" . $video_title . "&description=" . $video_desc . "&" . $access_token; echo $post_url; echo '<form enctype="multipart/form-data" action=" '.$post_url.' " method="POST"?>'; echo 'Please choose a file:'; echo '<input name="file" type="file"?>'; echo '<input type="submit" value="Upload" /?>'; echo '</form?>'; ?>
Developer News Page
A lot of interesting stats, case studies, and best practices get published about Facebook Platform every day. We created a new section on the Dev Site to track these articles.
Removing non-OAuth Endpoints
As part of our continued efforts to migrate all apps to Oauth 2.0, we are opting in all apps using the new JavaScript SDK to OAuth 2.0 the afternoon of December 8, 2011. This means that the oauth:true param in FB.init will be set to true by default. With this change, please ensure that you are using FB.getAuthResponse to obtain the access token. Full documentation available here.
As a reminder, we are also removing the old JavaScript library (FeatureLoader.js) and the old iPhone SDK (facebook-iphone-sdk) for authentication. Please ensure that you are no longer using these non-OAuth libraries. Users will not be able to authenticate with your app.
Upcoming breaking changes on January 1st, 2012
New upcoming change for April 1st, 2012
Please refer to the Platform Roadmap for more info.
Bug activity from 11/29 to 12/6
Bugs fixed and other changes from 11/29 to 12/6
Activity on facebook.stackoverflow.com this week:
Sign up for monthly updates from Meta for Developers.