Profile.setInfo
From Facebook Developer Wiki
Contents |
Description
Facebook will deprecate this method in late 2009/early 2010.
To integrate into the profile, use application tabs. For more information, please read the Developer Roadmap.
Configures an application info section that the specified user can install on the Info tab of her profile.
You prompt the user to install the section using the fb:add-section-button tag (set the section parameter to info). The button remains on your canvas page until the user clicks it to add the section.
Parameters
| Required | Name | Type | Description | |
| required | api_key | string | The application key associated with the calling application. If you specify the API key in your client, you don't need to pass it with every call. | |
|---|---|---|---|---|
| sig | string | An MD5 hash of the current request and your secret key, as described in the How Facebook Authenticates Your Application. Facebook computes the signature for you automatically. | ||
| v | string | This must be set to 1.0 to use this version of the API. If you specify the version in your client, you don't need to pass it with every call. | ||
| title | string | The title or header of the application info section. | ||
| type | int | Specify 1 for a text-only field-item configuration or 5 for a thumbnail configuration. | ||
| info_fields | array | A JSON-encoded array of elements comprising an application info section, including the field (the title of the field) and an array of info_item objects (each object has a label and a link, and optionally contains image, description, and sublabel fields. | ||
| uid | int | The user ID of the user adding the application info section. | ||
| optional | format | string | The desired response format, which can be either XML or JSON. (Default value is XML.) |
Example Requests
$info_fields = array(
array('field' => 'Favorite Bands',
'items' => array(array('label'=> 'The Mountain Goats',
'image' => 'http://foo.bar/Mountain_goats.jpg',
'description'=>'The Mountain Goats is an urban folk band led by American singer-songwriter John Darnielle.',
'link'=>'http://apps.facebook.com/music/Mountain_goats.php'),
array('label'=>'Radiohead',
'description' => 'Radiohead are an English alternative rock band from Oxfordshire.',
'image'=> 'http://foo.bar/Mountain_goats.jpg',
'link'=>'http://apps.facebook.com/music/Mountain_goats.php'))));
$fb->api_client->profile_setInfo('My Smilies', 5, $info_fields, $uid);
Error Codes
| Code | Description | |
| 1 | An unknown error occurred. Please resubmit the request. | |
|---|---|---|
| 2 | The service is not available at this time. | |
| 4 | The application has reached the maximum number of requests allowed. More requests are allowed once the time window has completed. | |
| 5 | The request came from a remote address not allowed by this application. | |
| 100 | One of the parameters specified was missing or invalid. | |
| 101 | The API key submitted is not associated with any known application. | |
| 102 | The session key was improperly submitted or has reached its timeout. Direct the user to log in again to obtain another key. | |
| 103 | The submitted call_id was not greater than the previous call_id for this session. | |
| 104 | Incorrect signature. | |
| 1051 | The submitted info_fields were invalid. Please check the formatting of your info_fields object and ensure all required values are specified. |
