diff --git a/src/FacebookDriver.php b/src/FacebookDriver.php index a764c86..b5e8d60 100644 --- a/src/FacebookDriver.php +++ b/src/FacebookDriver.php @@ -187,7 +187,7 @@ public function types(IncomingMessage $matchingMessage) 'sender_action' => 'typing_on', ]; - return $this->http->post('https://graph.facebook.com/v2.6/me/messages', [], $parameters); + return $this->http->post($this->facebookProfileEndpoint.'me/messages', [], $parameters); } /** @@ -336,7 +336,7 @@ public function buildServicePayload($message, $matchingMessage, $additionalParam */ public function sendPayload($payload) { - $response = $this->http->post('https://graph.facebook.com/v2.6/me/messages', [], $payload); + $response = $this->http->post($this->facebookProfileEndpoint.'me/messages', [], $payload); $this->throwExceptionIfResponseNotOk($response); return $response; @@ -383,7 +383,7 @@ public function sendRequest($endpoint, array $parameters, IncomingMessage $match 'access_token' => $this->config->get('token'), ], $parameters); - return $this->http->post('https://graph.facebook.com/v2.6/'.$endpoint, [], $parameters); + return $this->http->post($this->facebookProfileEndpoint.$endpoint, [], $parameters); } /**