Back to News for Developers

Platform Updates: Operation Developer Love

February 4, 2011ByEric Fisher

Operation Developer Love
This week, we launched two new features for apps that use Facebook Credits within their games: buy with friends and frictionless payments.

Sharing test accounts between apps
Since we launched the ability to create and manage test accounts via the Graph API, many of you have requested the ability to share test accounts across applications. As a result, we recently implemented additional parameters that let you do this.

<

p> Use the Graph API with the application access token to add an existing test account to it. The following PHP example shows how to add an existing test user to another application.

<

p>

&lt;?php

  //owner_app_id will create the test user
  $owner_app_id = 'OWNER_APP_ID';
  $owner_app_secret = 'OWNER_APP_SECRET';

  //app_id will share the test user with owner_app_id
  $app_id = 'YOUR_APP_ID';
  $app_secret = 'YOUR_APP_SECRET';

  $owner_token_url = "https://graph.facebook.com/oauth/access_token?" .
    "client_id=" . $owner_app_id .
    "&client_secret=" . $owner_app_secret .
    "&grant_type=client_credentials";

  $owner_access_token = file_get_contents($owner_token_url);
 
  $token_url = "https://graph.facebook.com/oauth/access_token?" .
     "client_id=" . $app_id .
     "&client_secret=" . $app_secret .
     "&grant_type=client_credentials";
   
  $access_token = file_get_contents($token_url);

  //create test user
  $request_url ="https://graph.facebook.com/" .
    $owner_app_id .
    "/accounts/test-users?installed=true&permissions=read_stream&" .
    $owner_access_token;

  $requests = file_get_contents($request_url);
  $post_url = $request_url . "&method=post";

  $result = file_get_contents($post_url);
  
  $obj = json_decode($result);
  $test_user_id = $obj->{'id'};

  //remove "access_token="
  $owner_access_token_short = substr($owner_access_token, 13);

  //add test user to app_id
  $request_url_test ="https://graph.facebook.com/" .
    $app_id .
    "/accounts/test-users?installed=true&permissions=read_stream&uid=" .
    $test_user_id . "&owner_access_token=" .
    $owner_access_token_short . "&" . $access_token;

  $result = file_get_contents($request_url_test);
  $post_url = $request_url_test . "&method=post";

  $result = file_get_contents($post_url);
?>

More information can be found in our documentation.

Fixing Bugs
Bugzilla activity for the past 7 days:

  • 126 new bugs were reported
  • 71 bugs were reproducible and accepted (after duplicates removed)
  • 6 bugs were fixed (5 previously reported bugs and 1 new bugs)
  • As of today, there are 4,452 open bugs in Bugzilla

Forum Activity
Developer Forum activity for the past 7 days:

  • 421 New Topics Created
  • 301 New Topics Received at least 1 reply
  • Of those 301, 138 were replied to by an Admin
  • Of those 301, 112 were replied to by a Moderator


Tags: