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

Learn More

See if user has 'liked' your Facebook page

1077 Runs 2836 Views 571 Copies
Saved

Saved

sundip 66

sundip
published 4 years ago

<html>
<head>
	<title>Facebook: Have you liked our page?</title>
	<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></script>

	<script type="text/javascript">
		var url = '';
		var a = '';
		$(document).ready(function() { 

			$.get('/oauthlogin', function(data) {
			 	url = data;
			});

			var interval = window.setInterval((function() {
			 	if (a.closed) {
			 		window.clearInterval(interval);
			 		window.location = '/like';
			 	}
			 }),1000);

		});
	</script>
  <link rel="stylesheet" href="styles.css" type="text/css" />
</head>
<body>
  <h1 id="header">Have you liked our Facebook page?</h1>
  <a href="#" id="fb-login" onclick="a = 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).