Permissions.checkAvailableApiAccess
From Facebook Developer Wiki
Contents |
Description
This method returns the API methods to which access has been granted by the specified application.
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. | ||
| permissions_apikey | string | The API key of the application for which the check is being done. |
Example Requests
Example Call Using the PHP Library
$methods = $facebook->api_client->permissions_checkAvailableApiAccess(<permissions-api-key>);
Response
The method returns an array of strings listing all methods/namespaces for which access is available.
Example Return XML
<?xml version="1.0" encoding="UTF-8"?>
<permissions_checkAvailableApiAccess_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">
{‘admin.’}
</permissions_checkAvailableApiAccess_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. | |
| 101 | The API key submitted is not associated with any known application. | |
| 104 | Incorrect signature. |
Notes
- This method does not require a
session_keyorcall_id. However, specifying acall_iddoes not cause any problems. - Desktop applications cannot call this method.
