O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting an App’s 4-1-1

Problem

Is there any way for me to retrieve the general public information about an app?

Solution

Use the Application.getPublicInfo() method, and pass in any one of the following properties for the target app:

  • application_id

  • api_key

  • application_canvas_name

Let’s say, for example, that you want to retrieve some information about the Zerofootprint Calculator. All three of the following will return the same array:

$appId = $facebook->api_client->application_getPublicInfo('8653633892');
$appAPI = $facebook->api_client->application_getPublicInfo
('d41570392c4b0d08a794f4a66b91a2a9');
$appCanvas = $facebook->api_client->admin_getPublicInfo('zfcalculator');

Discussion

The returned array includes the properties in Table 9-6.

Table 9-6. Properties returned by Application.getPublicInfo()

Property

Zerofootprint Calculator example

app_id

8653633892

api_key

d41570392c4b0d08a794f4a66b91a2a9

canvas_name

zfcalculator

display_name

Zerofootprint Calculator

icon_url

http://photos-892.ll.facebook.com/photos-ll-sctm/v43/8/8653633892/app_2_8653633892_7652.gif

logo_url

http://photos-892.ll.facebook.com/photos-ll-sctm/v43/8/8653633892/app_1_8653633892_3724.gif

developers

company_name

Zerofootprint Inc.

description

The Zerofootprint Calculator helps you measure your footprint on the environment. It takes just one minute to use and calculates how many tonnes of carbon you produce through driving, travel, diet, and home.

daily_active_users

300

daily_active_percentage

1

The developers field ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required