Profile.setInfoOptions

From Facebook Developer Wiki

Jump to: navigation, search

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.

Specifies the available items for a field in an application info section. These options populate the typeahead for a thumbnail.

Parameters

RequiredNameTypeDescription
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.
field string The title of the field.
options object A JSON-encoded object of items for a thumbnail, including a label and a link, and optionally contains image, description, and sublabel items.
optional format string The desired response format, which can be either XML or JSON. (Default value is XML.)

Example Requests

$field_info_options = 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_setInfoOptions('Favorite Bands', $field_info_options); // Note that the 'field' value must match one of the 'field' values from setInfo. In particular copy/paste of setInfo code and using "Title" value will not work.

Error Codes

CodeDescription
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.

See Also

reference