Requesting multiple Facebook fan page data at a time

I have about 20 fanpages settings for Facebook with the Welcome / Home application installed for all of them. Is there a way to count all the “Likes” of these files to display in my application? I tried using the FB.api () JavaScript SDK, serving its arrays (using .toString () and .join (',')), as well as JSON objects and even direct input. It appears that Facebook can only process one file id request for data at a time. I haven't looked yet, but is there any way to do this in PHP. I feel that I may face the same situation.

Suggestions would be great!

+5
source share
1 answer

Graph URL for multiple pages - https://graph.facebook.com/?ids=19292868552,11239244970

A few page requests as an example JavaScript JavaScript SDK:

FB.api(
    '/', 
    {ids : "19292868552,11239244970"}, 
    function(response) { 
        if (!response || response.error) {
            console.log(response.error); 
        } else { 
            console.log(response); 
        } 
    }
);

Multiple page requests in the form of PHP PHP SDK Example:

$result = $facebook->api('/', 'get', array('ids' => array('19292868552','11239244970')));
+10
source

All Articles