عودة إلى أخبار المطوّرين

Platform Updates: Operation Developer Love

٧ ديسمبر ٢٠١١بواسطة‏‎Cat Lee‎‏

This week, we published Internationalizing Open Graph Apps, Bringing Facebook Platform to Android Devices and are announcing the following changes:

New Features

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.

Deprecations

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

  • Deprecating the FB.Data.* JS SDK APIs: This will be no longer supported and will not be available to new apps.
  • Deprecating FB.Canvas.setAutoResize: We have renamed FB.Canvas.setAutoResize to FB.Canvas.setAutoGrow so that the method more accurately represents its function. Fb.Canvas.setAutoResize will be removed.
  • Deprecating FBML: FBML will no longer be supported as of January 1, 2012. Aside from security and privacy related bugs, we will not fix any bugs related to FBML January 1, 2012. On June 1, 2012 FBML endpoints will be removed from Platform.
  • All apps will be opted into "Upgrade to Requests 2.0" and "Requests 2.0 Efficient": Existing apps will be opted into "Requests 2.0 Efficient" and "Upgrade to Requests 2.0" migrations and all developers must ensure that they are using the correct request_id format and deleting requests appropriately. Details here.
  • Enforcing Credits Policy: We have added a new policy to the Facebook Credits Terms that prohibits routing Credits from one application to another application without our prior authorization. 2.14 You may not accept Credits in one application and deliver or transfer the purchase to the user in another application without our prior authorization. For example, an application solely designed to facilitate transactions is not permitted.Applications that are not compliant by January 1, 2012 run the risk of having their Credits disabled shortly after.

New upcoming change for April 1st, 2012

  • Removing support to claim Domains using Page ID:
    We will be deprecating the ability to claim domains with a Page ID. The recommended option for claiming domains is with an App ID or User ID and existing domains that have been claimed will continue to work fine. After claiming domains, owners are able to view insights or run Domain Sponsored Stories. Documentation for the domain claiming flow is updated here - Facebook Insights.

Please refer to the Platform Roadmap for more info.

Statistics

Bug activity from 11/29 to 12/6

  • 200 bugs were reported
  • 89 bugs were reproducible and accepted (after duplicates removed)
  • 29 bugs were by design
  • 23 bugs were fixed
  • 335 bugs were duplicate, invalid, or need more information

Bugs fixed and other changes from 11/29 to 12/6

Activity on facebook.stackoverflow.com this week:

  • 126 questions asked
  • 36 answered, 29% answered rate
  • 67 replied, 53% reply rate

اﻹشارات: