I'm using Symfony2 with HWIOAuthBundle. I managed to obtain requested data (including page likes), but if their number exceeds 24 and the user has more than 24 page likes facebook api sends next
attribute with the URL to call as following:
...
[24]=>
array(4) {
["category"]=>
string(26) "Computers/Internet Website"
["name"]=>
string(10) "IOScreator"
["id"]=>
string(16) "1488441341444225"
["created_time"]=>
string(24) "2015-01-30T10:28:42+0000"
}
}
["paging"]=>
array(2) {
["cursors"]=>
array(2) {
["before"]=>
string(20) "MTEyOTU3ODQ1NDAwNzAw"
["after"]=>
string(24) "MTQ4ODQ0MTM0MTQ0NDIyNQ=="
}
["next"]=>
string(99) "https://graph.facebook.com/v2.0/10152896110784845/likes?limit=25&after=MTQ4ODQ0MTM0MTQ0NDIyNQ%3D%3D"
}
}
Does anybody know how to request the next page within this bundle?
Here is how I obtain the first response:
$userProvider = $this->container->get('bundleName_user.oauth_provider');
$facebookResourceOwner = $this->container->get('hwi_oauth.resource_owner.facebook');
$accessToken = $request->get('accessToken');
$userResponse = $facebookResourceOwner->getUserInformation(array(
'access_token' => $accessToken
));