-
Notifications
You must be signed in to change notification settings - Fork 23
/
oauth2-example.html
33 lines (30 loc) · 1.72 KB
/
oauth2-example.html
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
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="shortcut icon" href="http://evbdn.eventbrite.com/s3-production/35362ce/django/images/icons/favicon.ico" />
<script src="http://code.jquery.com/jquery-1.6.1.js"></script>
<script type="text/javascript" src="https://raw.github.com/ryanjarvinen/Eventbrite.jquery.js/master/Eventbrite.jquery.js"></script>
<title>Eventbrite.jquery.js Test Examples</title>
</head>
<body>
<h1>Eventbrite.jquery.js OAuth2 widget example</h1>
<div id='target'> </div>
<a href="http://developer.eventbrite.com/news/branding/"><img src="http://evbdn.eventbrite.com/s3-s3/static/images/django/logos/eb_powered.png"/></a>
</body>
<script type="text/javascript">
// Eventbrite OAuth Client interaction example
// For this example to work on YOUR host:
// 1. You will need to update your API Key's redirect_uri, pointing it to the public url where your Eventbrite Login Widget is available.
// 2. You will also need to set YOUR_API_KEY below ( more info here: https://www.eventbrite.com/api/key )
// 3. Eventbrite recommends that you keep your users' access_tokens secret. Do not expose them to other users.
$('document').ready(function(){
// for more information about how to use this widget see https://github.com/ryanjarvinen/Eventbrite.jquery.js/blob/master/OAUTH2-README.md
Eventbrite.prototype.widget.login({'app_key': 'YOUR_API_KEY'}, function(widget_html){
// Place the resulting Eventbrite login widget code somewhere on your page.
// This example places the content into an element marked with class="eb_login_box"
$('#target').html(widget_html);
});
});
</script>
<style type="text/css">
</style>