FOSFacebookBundle and FOSUserBundle

我只是一个虾纸丫 提交于 2019-12-03 08:30:50

Here the solution:

in routing.yml

_security_check:
     pattern:  /loginFb

in security.yml:

      fos_facebook:
        check_path: /loginFb

in default controller:

    /**
 * Dummy controller.
 *
 * @Route("/loginFb")
 * @Template
 *
 * 
 * */
public function loginFbAction() {
}

https://github.com/FriendsOfSymfony/FOSFacebookBundle/tree/2.0#include-the-login-button-in-your-templates says:

Note that we wait 500ms before redirecting to let the browser dealing with the Facebook cookie. You can avoid this step but you might get this error message: "The Facebook user could not be retrieved from the session."

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!