[eluser]ibnclaudius[/eluser]
In my __construct i have this:
Code:
if ($this->facebook['active'] === TRUE)
{
$this->CI->load->library('facebook', $this->facebook['config']);
$id = $this->CI->facebook->getUser();
if ($id)
{
try {
$user = $this->CI->facebook->api('/me');
}
catch (FacebookApiException $e)
{
error_log($e);
$id = NULL;
}
}
else
{
echo $this->CI->facebook->getLoginUrl();
}
}
In this case, $this->CI->facebook->getLoginUrl() return what I want, but trying to retrieve the login url using a method give this error "Call to a member function getLoginUrl() on a non-object"
Code:
public function facebook_login_url()
{
return $this->CI->facebook->getLoginUrl();
}
Why?