public function executeFacebookCallback(sfWebRequest $request) { $fb_user = myUser::getFacebook()->getUser(); if ($fb_user) { $profile = myUser::getFbUserProfile(); $user = myUser::updateOrCreateFbUser($profile); $this->context->getUser()->signIn($user); $this->getUser()->setFlash('notice', 'Welcome !'); $this->redirect('@profile_home'); } else { $this->getUser()->setFlash('notice', 'Some problems with Facebook connection... Please try later. '); $this->redirect('@homepage'); } //$this->setTemplate(sfConfig::get('sf_app_module_dir') . '/' . 'sfGuardAuth/'. 'templates/' .'index'); }