This week, we introduced
creating and managing Test Users from the Developer App.
Add 'ref' parameter to feed stories to track analytics in App Insights
You can now specify a
ref parameter in our
Feed Dialog to better optimize the performance of different feed story types. For example, you can add the
ref parameter using
FB.ui in the
JavaScript SDK:
<html>
<head>
<title>Example feed dialog with ref param</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js">
</script>
<script>
FB.init({
appId:'YOUR APP ID', cookie:true,
status:true, xfbml:true
});
var publish = {
method: 'feed',
name: 'YOUR NAME',
caption: 'YOUR CAPTION',
description: (
'YOUR DESCRIPTION'
),
link: 'YOUR_LINK',
picture: 'YOUR_PHOTO',
actions: [
{ name: 'YOUR ACTION',
link: 'YOUR LINK' }
],
ref:'YOUR REF PARAM'
};
FB.ui(publish);
</script>
</body>
</html>
Or via the Graph API (must have the
publish_stream permission):
curl -F 'message=YOUR MESSAGE' \
-F 'link=YOUR_LINK' \
-F 'type=link' \
-F 'ref=foo,bar' \
-F 'access_token=...' \
https://graph.facebook.com/USER_ID/feed
Or via PHP (this example publishes a feed story with a
ref parameter):
<?php
$app_id = "YOUR_APP_ID";
$app_secret = "YOUR_APP_SECRET";
$post_login_url = "YOUR_POST_LOGIN_URL";
$custom_message = "Hello World";
$code = $_REQUEST["code"];
//Obtain the access_token with publish_stream permission
if (!$code){
$dialog_url= "http://www.facebook.com/dialog/oauth?"
. "client_id=" . $app_id
. "&redirect_uri=" . urlencode( $post_login_url)
. "&scope=publish_stream";
echo("<script>top.location.href='" . $dialog_url
. "'</script>");
} else {
$token_url="https://graph.facebook.com/oauth/access_token?"
. "client_id=" . $app_id
. "&client_secret=" . $app_secret
. "&redirect_uri=" . urlencode( $post_login_url)
. "&code=" . $code;
echo 'token_url' . $token_url;
$response = file_get_contents($token_url);
$params = null;
parse_str($response, $params);
$access_token = $params['access_token'];
//get userid
$uid_url = "https://graph.facebook.com/me?fields=id";
$user_id = json_decode(file_get_contents($uid_url));
$user_id = $user_id[0];
// POST to Graph API endpoint to publish feed story
$graph_url= "https://graph.facebook.com/"
. $user_id . "/feed?"
. "message=" . urlencode($custom_message)
. "&link=" . urlencode("YOUR_URL")
. "&type=link"
. "&ref=foo"
. "&method=POST"
. "&access_token=" .$access_token;
echo($graph_url);
echo '<html><body>';
echo file_get_contents($graph_url);
echo '</body></html>';
}
?>
Categories appear on the Insights Dashboard so that you can view the performance of a new story type separate from your app’s overall insights:
Manage_notifications permission and /me/notifications
Starting October 22nd, to read or manipulate a user’s
notifications, we will require you to get the
manage_notifications permission. You can turn on the “Require manage_notifications permission” migration from the About->Advanced section of your app’s settings in the
Developer app. Additionally, starting on Tuesday night, you’ll be able to access a user’s notifications via the Graph API using the
notifications connection on the
me identifier. We’ll update the
documentation when this launches.
Excluding specific IDs and limiting number of recipients in the Requests Dialog
Since we launched the
Requests Dialog, the number one requested feature has been the ability to exclude specified users from showing in the dialog. Another popular request was to add the ability to limit the maximum number of requests that a user can send. We’re happy to announce that this week, we launched both of these features. You can check out the
Requests Dialog documentation for more information.
Deauthorizing an app and revoking permissions via the Graph API
You can now revoke permissions or deauthorize your app for a user via the Graph API. This was previously only possible via the Old REST API. For more on this change, check out the
documentation.
We’re continuing to work on porting more of the best of the Old REST API’s functionality over to the Graph API.
New metrics in Insights table
We’ve added new metrics to the
Insights table for both websites and apps:
Websites
domain_feed_clicks
domain_feed_views
domain_stories
domain_widget_like_views
domain_widget_likes
domain_widget_like_feed_views
domain_widget_like_feed_clicks
Apps
application_api_errors_rate
application_api_time_average
application_canvas_time_average
application_canvas_errors
application_canvas_errors_rate
Documentation Activity for the Last Seven Days
We updated the FQL documentation for the following tables:
We updated the
Javascript SDK documentation to reflect the changes we
introduced last week to make the Javascript SDK work with OAuth 2.0.
98 docs are under review.
Fixing Bugs
Bugzilla activity for the past 7 days:
- 140 new bugs were reported
- 71 bugs were reproducible and accepted (after duplicates removed)
- 206 bugs were fixed (205 previously reported bugs and 1 new bug - we found a bunch of bugs that had been fixed but hadn’t been marked as such in Bugzilla, so while these weren’t all fixed this week, they had not yet been included in our “fixed” stats)
- As of today, there are 1,048 open bugs in Bugzilla (down 240 from last week)
Forum Activity
Developer Forum activity for the past 7 days:
- 417 New Topics Created
- 170 New Topics received a reply
- 11% received a reply from a community moderator or a Facebook employee