Speed up development with full-stack environments for every branch.

Learn More

Get Access Token from Elance

97 Runs 368 Views 23 Copies
Saved

Saved

sundip 66

sundip
published 4 years ago

<html>
<head>
	<title>Facebook Server-side OAuth Example</title>
	<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></script>

	<script type="text/javascript">
		var url = '';
		var w = '';
      $(document).ready(function() {
        $.get('/login', function(data) {
          url = data;
        }); 
      });

     var interval = window.setInterval((function() {
        if (w.closed) {
          window.clearInterval(interval);       
          window.location = '/friends';
        }
      }),1000);
	</script>
    <link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body>
<h1 id="header">Get Friends on Facebook</h1>
<a href="#" id="fb-login" onclick="w = window.open(url, 'window', 'status=0,menubar=0,resizable=1,width=500,height=800;');">Login to Facebook</a>
</body>
</html>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).