Skip to content

Commit

Permalink
Merge pull request #7 from LeorentKelmendi/master
Browse files Browse the repository at this point in the history
[Fix] `Something went wrong while fetching the access token`
  • Loading branch information
nikolajlovenhardt authored Feb 1, 2018
2 parents f61fe92 + 5ecf1aa commit 4d218c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LaravelFacebookAds/Services/FacebookAdsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ public function generateAppToken(AccountInterface $account)
)
);

if (!substr_count($token, 'access_token=')) {
if (!substr_count($token, 'access_token')) {
return false;
}

$token = str_replace('access_token=', '', $token);
$token = str_replace('"access_token":', '', $token);

return $token;
}
Expand Down

0 comments on commit 4d218c2

Please sign in to comment.