Application.getPublicInfo
From Facebook Developer Wiki
Contents |
Description
Returns public information for an application (as shown in the application directory) by either application ID, API key, or canvas page name. Returned fields include:
- application ID (app_id)
- API key (api_key)
- canvas page name (canvas_name)
- display name (display_name)
- application icon URL (icon_url)
- application logo URL (logo_url)
- developers
- company name (company_name)
- description
- number of daily active (users daily_active_users)
- number of weekly active users (weekly_active_users)
- number of monthly active users (monthly_active_users)
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. | ||
| optional | application_id | int | Application ID of the desired application. You must specify exactly one of application_id, application_api_key or application_canvas_name. | |
| application_api_key | string | API key of the desired application. You must specify exactly one of application_id, application_api_key or application_canvas_name. | ||
| application_canvas_name | string | Canvas page name of the desired application. You must specify exactly one of application_id, application_api_key or application_canvas_name. | ||
| format | string | The desired response format, which can be either XML or JSON. (Default value is XML.) | ||
| callback | string | Name of a function to call. This is primarily to enable cross-domain JavaScript requests using the <script> tag, also known as JSONP, and works with both the XML and JSON formats. The function will be called with the response passed as the parameter. |
Example Return XML
<?xml version="1.0" encoding="UTF-8"?>
<application_getPublicInfo_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">
<app_id>2413267546</app_id>
<api_key>c756401cb800e295f21d723b7842ea83</api_key>
<canvas_name>ilike</canvas_name>
<display_name>iLike</display_name>
<icon_url>http://photos-c.ak.facebook.com/photos-ak-sctm/v43/130/2413267546/app_2_2413267546_6706.gif</icon_url>
<logo_url>http://photos-c.ak.facebook.com/photos-ak-sctm/v43/130/2413267546/app_1_2413267546_2324.gif</logo_url>
<developers list="true"/>
<company_name>iLike, inc</company_name>
<description>iLike lets you add music to your profile and find your favorite concerts (not to mention see who else is going!). Bonus: Use it to get free mp3’s that match your tastes and try to beat your friends at the Music Challenge.</description>
<daily_active_users>392008</daily_active_users>
<weekly_active_users>1341749</weekly_active_users>
<monthly_active_users>3922784</monthly_active_users>
</application_getPublicInfo_response>
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. For example, not passing exactly one of application_id, application_api_key or application_canvas_name. | |
| 101 | The API key submitted is not associated with any known application. | |
| 104 | Incorrect signature. | |
| 900 | No such application exists. |
Notes
This function does not require a session_key or call_id (although specifying a call_id does not cause any problems).
