FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle
321 stars 140 forks source link

Facebook login button doesn't redirect to the action. #217

Open MohamadEz opened 11 years ago

MohamadEz commented 11 years ago

I have installed the FOSFacebookBundle and followed the instructions in (readme) . The problem is that the login button doesn't redirect to the action specified in the JS code

function goLogIn(){ window.location.href = "{{ path('_login_check') }}"; }

-it redirects to the same page. -the routing for the '_login_check' is working well. Thanks in advance.

amine2z commented 11 years ago

the redirect work wwell. He redirect to an action of bundle that check login with facebook graph and after they redirect you to the referrer page

MohamadEz commented 11 years ago

then,what this " window.location.href = "{{ path('_login_check') }}"; " path refers to if it redirects well ?

amine2z commented 11 years ago

the {{ path('_login_check') }} refer to the check path that you've defined in sexurity parameters:

fos_facebook: check_path: /login_fb_check

arashdalir commented 11 years ago

the problem might be that your configurations of facebook side might be faulty. i had the same problem; i did everything according to the documentations and i still couldn't get redirected from the login page to the check login. i checked the configs in facebook app and found out that the domains value in configurations was missing. just updated it to comply with the value of my site url (i'm using the website login integration). maybe that's the same case for you. i'd also suggest using full urls instead of paths. not sure if there would be any problems in that regard, but it would definitely help lowering the chance of having problems. to do that (as i'm sure you know), use url() instead of path() in your template. please tell me if my answer was helpful; because i know there has been a login time since you've posted this issue...