Skip to content

Commit 68c5727

Browse files
committed
platform as param
1 parent e54bf8a commit 68c5727

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Plugins/Messenger/Traits/AccessesInstagram.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ trait AccessesInstagram
2121
/**
2222
* @param $page_id
2323
* @param $fields
24+
* @param string $platform
2425
* @param string|null $user_id
2526
* @return \Psr\Http\Message\ResponseInterface
2627
*/
27-
public function conversations($page_id, $fields, $user_id = null) {
28+
public function conversations($page_id, $fields, $platform = "instagram", $user_id = null) {
2829
$this->checkForPageAccessTokenAndGraphApiVersion();
29-
$url = sprintf($this->url . "/%s/$page_id/conversations?platform=instagram&access_token=%s&fields=$fields", $this->graph_api_version, $this->page_access_token);
30+
$url = sprintf($this->url . "/%s/$page_id/conversations?platform={$platform}&access_token=%s&fields=$fields", $this->graph_api_version, $this->page_access_token);
3031

3132
if (!is_null($user_id)) {
3233
$url = "$url&user_id=$user_id";

0 commit comments

Comments
 (0)