Admin.getAllocation

From Facebook Developers Wiki

Jump to: navigation, search

Contents

[edit] Description

Returns the current allocation limits for your application for the specified integration points. Allocation limits are determined daily. Integration points include:

  • notifications_per_day - The number of notifications your application can send on behalf of a user per day.
  • requests_per_day - The number of requests your application can send on behalf of a user per day.
  • emails_per_day - The number of email messages your application can send to a user per day.
  • email_disable_message_location - The location of the disable message within emails sent by your application. '1' is the bottom of the message and '2' is the top of the message.

These limits also appear on the Allocations tab on the Insights dashboard (click on "Stats") for your application in the Facebook Developer application.


[edit] Parameters

RequiredNameTypeDescription
required api_key string The application key associated with the calling application.
session_key string The session key of the logged in user.
call_id float The request's sequence number. Each successive call for any session must use a sequence number greater than the last. We suggest using the current time in milliseconds, such as PHP's microtime(true) function.
sig string An MD5 hash of the current request and your secret key, as described in the authentication guide.
v string This must be set to 1.0 to use this version of the API.
integration_point_name string The name of the integration point. Integration points include notifications_per_day, requests_per_day, emails_per_day, and email_disable_message_location.
optional format string Desired response format. Either XML (default) or JSON.
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.


[edit] Example Request

$fb->api_client->admin_getAllocation('notifications_per_day')


[edit] Response

This method returns the allocation limit for your application for the specified integration point.


[edit] Error Codes

CodeDescription
1 An unknown error occurred. Please resubmit the request.
4 The application has reached the maximum number of requests allowed. More requests are allowed once the time window has completed.
100 One of the parameters specified was missing or invalid.
200 Permissions error.
801 Data quota exceeded.
805 Database error.
Navigation