Skip to content

Commit

Permalink
setState on FacebookConnect
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Apr 11, 2019
1 parent 6b430eb commit 796369a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Bi/Connect/Facebook/FacebookConnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ public function setAccessToken($token)
$this->facebookClient->setDefaultAccessToken($token);
}

/**
* @param $state
* @return $this
*/
public function setState($state): self
{
if (is_array($state)) {
$state = json_encode($state);
}

$this->facebookClient
->getRedirectLoginHelper()
->getPersistentDataHandler()
->set('state', $state);

return $this;
}

/**
* Get login url.
*
Expand Down

0 comments on commit 796369a

Please sign in to comment.