I am trying to use facebook login and registration on my web page. My webpage is curerntly hosted on localhost and both Facebook login and Register CODE are working properly. But i cannot figure out how do i use that data to store and write php code.
eg. Code for registration form
<iframe src="https://www.facebook.com/plugins/registration?
client_id=&
redirect_uri=http://localhost:90/store.php&
fields=name,birthday,gender,location,email"
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="100%"
height="330">
</iframe>
Code for Login button
<div id="fb-root"></div>
<script>(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/all.js#xfbml=1&appId=";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-login-button" data-show-faces="true" data-width="200" data-max-rows="1"></div>
Both are displaying and working respectively, but how do i use these variables?
How do i check whether user is already logged in? if not, how do i make him login and redirect to another page with his info. Mainly i dont see any variables in this code to use.
Any help?