/** * @return \Phalcon\Http\Response|\Phalcon\Http\ResponseInterface */ public function tokenFacebookAction() { $this->view->disable(); $auth = new FacebookAuth($this->config->facebook); list($uid, $token, $user) = $auth->authorize(); if (isset($token) && is_object($token)) { //Edit/Create the user $object = Users::findFirstByUuidFacebook($uid); $this->commonOauthSave($uid, $user, $token, $object, 'Facebook'); } else { $this->flashSession->error('Invalid Google response. Please try again'); return $this->response->redirect(); } }