Profile.getInfo

From Facebook Developer Wiki

Revision as of 22:42, 28 October 2009 by Pete Bratach (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
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.

Returns the specified user's application info section for the calling application. These info sections have either been set via a previous profile.setInfo call or by the user editing them directly. The content returned is specified within info_fields.

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.
optional uid int The user ID of the user who added the application info section. Either this or the session key value must be submitted.
session_key string The session key of the logged in user. The session key is automatically included by our PHP client.
format string The desired response format, which can be either XML or JSON. (Default value is XML.)

Example Return XML

<profile_getInfo_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd"> <title>My Smilies</title> <info_fields list="true"> <info_field> <field>Good Smilies</field> <items list="true"> <info_item> <label>Happy</label> <sublabel/> <description>The original and still undefeated.</description> <link>http://www.facebook.com</link> <image>http://fbplatform.mancrushonmcslee.com/smiley/images/smile0.jpg</image> </info_item> <info_item> <label>Indifferent</label> <description>meh...</description> <link>http://www.facebook.com</link> <image>http://fbplatform.mancrushonmcslee.com/smiley/images/smile1.jpg</image> </info_item> <info_item> <label>Sad</label> <description>Oh my god! you killed my dog!</description> <link>http://www.facebook.com</link> <image>http://fbplatform.mancrushonmcslee.com/smiley/images/smile2.jpg</image> </info_item> <info_item> <label>Cool</label> <description>Yeah. whatever</description> <link>http://www.facebook.com</link> <image>http://fbplatform.mancrushonmcslee.com/smiley/images/smile3.jpg</image> </info_item> </items> </info_field> <info_field> <field>Bad</field> <items list="true"> <info_item> <label>Evil</label> <link>http://www.evil.com</link> </info_item> </items> </info_field> </info_fields> </profile_getInfo_response> //Note: There is a callback URL in your app settings to be notified of each change in real-time.

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.
1050 No information sections have been set for this user.
reference