Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Part of the Facebook Developer Garage series
Profile Security <ul><li>Controlled External Content </li></ul><ul><ul><li>Consistent presentation </li></ul></ul><ul><ul>...
Methods for Profile Update <ul><li>profile_setFBML()‏ </li></ul><ul><ul><li>User access restricted </li></ul></ul><ul><li>...
fb:ref method <fb:ref handle=&quot;HANDLE_HERE&quot; /> or <fb:ref url=&quot; http:// acme.ca/update.php?handle =HANDLE_HE...
Infinite session <ul><li>Maintains an infinite session for the application developer to make updates, required to run: </l...
Get Infinite Session <?php // Include the facebook library config files. $facebook = new Facebook($api_key, $secret); // f...
Use Session Key <?php // Include the facebook library config files. $facebook = new Facebook($api_key, $secret); $user = Y...
Upcoming SlideShare
Loading in …5
×

Facebook Profile Updates

5,615 views

Published on

Published in: Technology, Business
  • Be the first to like this

Facebook Profile Updates

  1. 1. Part of the Facebook Developer Garage series
  2. 2. Profile Security <ul><li>Controlled External Content </li></ul><ul><ul><li>Consistent presentation </li></ul></ul><ul><ul><li>User Experience </li></ul></ul><ul><li>Content Rules </li></ul><ul><ul><li>No iFrames </li></ul></ul><ul><ul><li>No auto-run for Flash and Silverlight </li></ul></ul><ul><li>Caching </li></ul><ul><ul><li>Profile Boxes are cached </li></ul></ul><ul><ul><li>Limit load on your server </li></ul></ul><ul><ul><li>Require explicit update </li></ul></ul>
  3. 3. Methods for Profile Update <ul><li>profile_setFBML()‏ </li></ul><ul><ul><li>User access restricted </li></ul></ul><ul><li>fb:ref </li></ul><ul><ul><li>URL </li></ul></ul><ul><ul><li>Handle </li></ul></ul>
  4. 4. fb:ref method <fb:ref handle=&quot;HANDLE_HERE&quot; /> or <fb:ref url=&quot; http:// acme.ca/update.php?handle =HANDLE_HERE&quot; /> Then: facebook.fbml.setRefHandle(&quot;HANDLE_HERE&quot;, &quot;FBML_Content&quot;) ‏ or facebook.fbml.refreshRefUrl(&quot; http://acme.ca/update.php?handle = HANDLE_HERE&quot;) ‏ Note: Multiple Handles possible in the profile page, mass updates and 1 to many updates Infinite Session Required
  5. 5. Infinite session <ul><li>Maintains an infinite session for the application developer to make updates, required to run: </li></ul><ul><ul><li>profile_setFBML() ‏ </li></ul></ul><ul><ul><li>facebook.fbml.setRefHandle() ‏ </li></ul></ul><ul><ul><li>facebook.fbml.refreshRefUrl() ‏ </li></ul></ul><ul><li>Note: User's can update their own profiles, infinite session is only require you want to update the profile without them interacting with your application. </li></ul>
  6. 6. Get Infinite Session <?php // Include the facebook library config files. $facebook = new Facebook($api_key, $secret); // force a login page $facebook->require_frame(); $user = $facebook->require_login(); // Echo the &quot;infinite session key&quot; that everyone keeps talking about. echo $facebook->api_client->session_key; ?> Note: Logout and go to Callback URL
  7. 7. Use Session Key <?php // Include the facebook library config files. $facebook = new Facebook($api_key, $secret); $user = YOUR_FACEBOOK_USER_ID; $key = SESSION_KEY_WE_PROCURED_ABOVE; // Allows &quot;you&quot; to run your script $facebook->set_user($user, $key);

×