Osclass forums

Support forums => Plugins => Facebook Connect => Topic started by: ColdWabmaster on March 10, 2016, 04:45:15 pm

Title: [SOLVED] How to make page to go back to homepage after facebook connect ?
Post by: ColdWabmaster on March 10, 2016, 04:45:15 pm
 I have noticed that when I add facebook connect on login and registration page it doesn't redirect back to homepage and still remains in login or register page after facebook login or register. This seems odd and I want facebook connect to go homepage, how can I achieve that ? ???
Title: Re: How to make page to go back to homepage after facebook connect ?
Post by: pecke on March 10, 2016, 11:30:27 pm
add this to redirect to user dashboard or change code to redirect to home page in file user-login.php if you put there facebook login button

Code: [Select]
<?php 
    
if($_GET["state"]!=''){
   
header('Location: /index.php?page=user&action=dashboard' );
   }
   
?>

to home page

Code: [Select]
<?php 
    
if($_GET["state"]!=''){
   
header('Location: /index.php' );
   }
   
?>
Title: Re: How to make page to go back to homepage after facebook connect ?
Post by: ColdWabmaster on March 11, 2016, 03:21:45 pm
Your suggested code redirected the page to my homepage.
but site is a multi site and I have separate directory for classified site.
My bender index.php is located at /public_html/classifieds/oc-content/themes/bender

Now what Can I do ???
Title: Re: How to make page to go back to homepage after facebook connect ?
Post by: pecke on March 11, 2016, 04:14:48 pm
sorry i dont understand ,can you write here url where you want to redirect login and register page and your site url.
Title: Re: How to make page to go back to homepage after facebook connect ?
Post by: ColdWabmaster on March 13, 2016, 05:44:08 am
I just replaced the  header('Location: /index.php?page=user&action=dashboard' )
with  header('Location: /calssified/users/profile' )
 and it worked thanks anyway.
Title: Re: How to make page to go back to homepage after facebook connect ?
Post by: pecke on March 14, 2016, 12:24:37 am
ok then you can mark topic as Solved
Title: Re: How to make page to go back to homepage after facebook connect ?
Post by: edy12 on June 14, 2016, 10:21:14 am
add this to redirect to user dashboard or change code to redirect to home page in file user-login.php if you put there facebook login button

Code: [Select]
<?php 
    
if($_GET["state"]!=''){
   
header('Location: /index.php?page=user&action=dashboard' );
   }
   
?>

to home page

Code: [Select]
<?php 
    
if($_GET["state"]!=''){
   
header('Location: /index.php' );
   }
   
?>

excuse me sir..
i have install facebook connect plugin.. i use osclass 3.6.1, with osclasswizards theme..

after add the api key and secret key on admin panel, i try to add the code in user-login.php.
but after i login with facebook i got blank page..can u help me where and what else i should add to the file..
here is the ss of the code i add..
(http://s32.postimg.org/c6nz2dvch/Untitled2.jpg) (http://postimg.org/image/c6nz2dvch/)

thanks a lot for ur help..
Title: Re: [SOLVED] How to make page to go back to homepage after facebook connect ?
Post by: pecke on June 19, 2016, 03:59:40 am
please add original code from my post... your code is wrong dont put code to button