Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <body>
- <div id="dz-root"></div>
- <a href="#" id="dtest">Login</a>
- <a href="#" id="lstat">Get Login Status</a>
- <a href="#" id="getme">Me</a>
- <script type="text/javascript" src="http://cdn-files.deezer.com/js/min/dz.js"></script>
- <script src="js/index.js"></script>
- </body>
- </html>
- DZ.init({
- appId: "253122",
- channelUrl: "http://mopho.local/deezer-channel.html",
- });
- document.getElementById("dtest").addEventListener("click", () => {
- DZ.login(function(response) {
- console.log("1",response);
- }, {perms: 'basic_access,email'});
- });
- document.getElementById("lstat").addEventListener("click", () => {
- DZ.getLoginStatus(function(response) {
- console.log(response);
- });
- });
- document.getElementById("getme").addEventListener("click", () => {
- DZ.api('/user/me',
- function(response) {
- console.log("2",response);
- }
- );
- });
- <script src="http://cdn-files.deezer.com/js/min/dz.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement