3

I built a custom page, more like a landing page with facebook login with permission. What I want is to simply redirect users to home page. My main page is www.ngncareers.com/index.php I built this www.ngncareers.com/index.html as landing page with facebook login. Please how do I redirect users to www.ngncareers.com/index.php after logging into my facebook app via www.ngncareers.com/index.html.

HERE IS MY SOURCE CODE. PLEASE CAN SOMEONE GOOD OUT THERE KINDLY ASSIST ME. I AM JUST A NOVICE ON PHP.

<div id="content"> <div class="post"> <h2>Please Login with Facebook</h2> <center><div class="fb-login-button" data-size="xlarge" data-show-faces="true" data-scope="email,publish_actions,manage_pages,manage_notifications,user_likes" data-auto-logout-link="false"></div></center> <div id="fb-root"></div> 
`window.fbAsyncInit = function() { FB.init({ appId : '78797XXXXXXXXXX', xfbml : true, version : 'v2.0' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));

`

1 Answer 1

0

The first strange fact is that you get an index.html and index.php you can simply have one index.php with html inside.

You can have Pop-in window's style for login into facebook. If you use Javascript, use window.location for a proper redirection.

You should look about "button login Facebook tutorial" which would be really simple. Look also about Facebook developers webpage for more informations and tutorials.

Hope it could help !

Sign up to request clarification or add additional context in comments.

3 Comments

Well I wasn't the one that created the script. I was thinking it would be easy since am a novice in PHP. You suggestion is more complicated. thanks though
developers.facebook.com/docs/plugins/login-button On this link you can set your button and "Get the code" You can't get easier.
How can I use this attribute "onlogin" function to my advantage in solving this. They said this is A JavaScript function to trigger when the login process is complete. can this do the redirect. And how can it be done. Can a guru here please help me out?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.