Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 4cad9e0

Browse files
committed
At least one endpoint allows for the type parameter to be set in the URL (paginated responses for example). If we're making a request to a URL with 'type' already specified, we don't need to include it as a query parameter
1 parent b3b00f0 commit 4cad9e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Facebook/FacebookResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ private function handlePagination($direction) {
188188
$url = parse_url($this->responseData->paging->$direction);
189189
parse_str($url['query'], $params);
190190

191+
if (isset($params['type']) && strpos($this->request->getPath(), $params['type']) != false){
192+
unset($params['type']);
193+
}
191194
return new FacebookRequest(
192195
$this->request->getSession(),
193196
$this->request->getMethod(),

0 commit comments

Comments
 (0)