ข่าวสารของผู้พัฒนา
Platform Updates: New User Object fields, Edge.remove Event and More


Update: The user_address and user_mobile_phone permissions have been removed. Please see this post for more info.



User Address and Mobile Phone Number
We are now making a user’s address and mobile phone number accessible as part of the User Graph object. Because this is sensitive information, we have created the new user_address and user_mobile_phone permissions. These permissions must be explicitly granted to your application by the user via our standard permissions dialogs.

Please note that these permissions only provide access to a user’s address and mobile phone number, not their friend's addresses or mobile phone numbers.

You can request these permissions our SDKs (JavaScript SDK below):

<html>
<head>
<title>My Great Website</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 
             });
        FB.login(function(response) {
          if (response.session && response.perms) {
            alert(response.perms);
          }
        }, {perms:'user_address, user_mobile_phone'});
        <script>
      <body>
<html>

Or using the Login Button:

<html>
<head>
<title>My Great Website</title>
</head>
   <body>
      <script src="http://connect.facebook.net/en_US/all.js#xfbml=1&
      appId=YOUR_APP_ID"></script>
      <div id="fb-root"></div>
      <fb:login-button perms="user_address,user_mobile_phone">Login
      </fb:login-button>
   <body>
</html>

Or using our Platform Dialogs directly:

http://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&
&nbsp&nbsp&nbsp&nbsp redirect_uri=YOUR_URL&scope=user_mobile_phone,user_address

With these permissions granted, the address and mobile phone number fields will appear in the User graph object:

https://graph.facebook.com/me?access_token=ACCESS_TOKEN

You can also requests just these fields using the fields query parameter:

https://graph.facebook.com/me?fields=address,mobile_phone&
access_token=ACCESS_TOKEN

As a reminder, the access and use of this data is governed by our Platform Policies which we recommend you review periodically.

Edge.remove event added
As you requested, you can now subscribe to the “edge.remove" event to know when a user unlikes a page. For example:

<html>
<body>
  <div id="fb-root"></div>
  <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
  <script>
    FB.Event.subscribe('edge.create', function(href, widget) {
      alert('You just liked '+href);
    });
    FB.Event.subscribe('edge.remove', function(href, widget) {
      alert('You just unliked '+href);
    });
  </script>
  <fb:like>
</body>
</html>

Developer Love
Bugzilla activity for the past 8 days:

  • 135 new bugs were reported
  • 11 bugs were reproducible and accepted (after duplicates removed)
  • 14 bugs were fixed (13 previously reported bugs and 1 new bug)
  • As of today, there are 4,442 open bugs in Bugzilla

Developer Forum activity for the past 7 days:

  • 644 New Topics Created
  • 406 New Topics Received at least 1 reply
  • Of those 406, 171 were replied to by an Admin
  • Of those 406, 78 were replied to by a Moderator

Jeff Bowen works in developer support.