-
Notifications
You must be signed in to change notification settings - Fork 0
/
callback.php
35 lines (32 loc) · 1.18 KB
/
callback.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
require_once('Oauth/shelbyoauth/shelbyoauth.php');
require_once('Oauth/config.php');
session_start();
$connection = new ShelbyOAuth(CONSUMER_KEY, CONSUMER_SECRET, $_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
$user = $connection->getResource('users');
$channels = $connection->getResource('channels');
$broadcasts = $connection->getResource('channels/'.$channels[0]->_id.'/broadcasts');
?>
<html>
<head>
<title>Shelby+</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="assets/css/style.css"/>
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="assets/js/shelby-player.js"></script>
<script type="text/javascript">
var json = <?php echo json_encode($broadcasts); ?>;
var channel = "<?php echo $channels[0]->_id; ?>";
</script>
<script type="text/javascript" src="assets/js/shelbyplus.js"></script>
</head>
<body>
<header id="header">
<h1>Shelby+</h1>
<a id="logout" href="./logout.php">Log Out</a>
</header>
<div id="player-div"></div>
<div id="cats"></div>
<div id="popup" style="z-index:1000; display: none;"></div>
</body>
</html>