Getting Allocations

Problem

I need to retrieve my allocations from Facebook so that I know how many Notifications I can send out per day.

Solution

Use the Admin.getAllocations() method:

$allocation = $facebook->api_client->admin_getAllocation('notifications_per_day');

Discussion

This method supports retrieving a number of different allocations, as shown in Table 9-3.

Table 9-3. Allocations

Allocation

Description

notifications_per_day

Number of Notifications your application can send per user per day

requests_per_day

Number of requests your application can send per user per day

emails_per_day

Number of email messages your application can send to a user per day

email_disable_message_location

Location of the disable message within emails sent by your application (“1” is at the bottom and “2” is the top)

For more information about allocations, see Understanding Allocations.

Get Facebook Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.