I finally found a hack that works, I will leave it here for the next guy who is looking for it. If you verify that you have a valid token for your user and application, HybridAuth should not attempt to redirect or return any errors.
(I use Codeigniter, but translating it to a "clean" HybridAuth should be simple:
$token = "GET A TOKEN IN Facebook API EXPLORER"; $this->load->library('HybridAuthLib'); $this->hybridauthlib->storage()->set( "hauth_session.facebook.is_logged_in", 1 ); $this->hybridauthlib->storage()->set( "hauth_session.facebook.token.access_token", $token ); $service = $this->hybridauthlib->authenticate('Facebook'); if ($service->isUserConnected()){ $user_profile = $service->getUserProfile(); $contacts = $service->getUserContacts(); $access_token = $service->getAccessToken(); var_dump($user_profile); var_dump($contacts); var_dump($access_token); }else{ echo "something went wrong"; }
source share