Skip to content
This repository was archived by the owner on Dec 13, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions application/libraries/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,33 @@ public function send_batch_pool()
/**
* Generate Facebook login url for Facebook Redirect Login (web)
*
* @param string $reRequest
* If the permissions should be re-asked (if they were denied before)
*
* @return string
*/
public function login_url()
public function login_url($reRequest = false)
{
// Login type must be web, else return empty string
if ($this->config->item('facebook_login_type') != 'web')
{
return '';
}

return $this->helper->getLoginUrl(
base_url() . $this->config->item('facebook_login_redirect_url'),
$this->config->item('facebook_permissions')
);
if ($reRequest)
{
return $this->helper->getReRequestUrl(
base_url() . $this->config->item('facebook_login_redirect_url'),
$this->config->item('facebook_permissions')
);
}
else
{
return $this->helper->getLoginUrl(
base_url() . $this->config->item('facebook_login_redirect_url'),
$this->config->item('facebook_permissions')
);
}
}

/**
Expand Down