Saturday, 14 September 2013

Redirect to Facebook login URL using PHP SDK in Kohana 3.3

Redirect to Facebook login URL using PHP SDK in Kohana 3.3

I have a controller handling user registration using FB data:
if ($this->isLogged()) {
try {
$apiObject = $this->_fb->api('/me');
} catch (FacebookApiException $e) {
$apiObject = null;
throw $e;
}
} else {
HTTP::redirect($this->getLoginUrl());
}
But redirect is not working it just redirects back to the page at which
was this code triggered.
How can I redirect user to FB in Kohana 3.3 so he can log in?

No comments:

Post a Comment