Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Login with XING plugin Example</title>
- <meta charset="UTF-8">
- <script>
- // This function is called by the plugin after
- // the login flow is completed.
- function onXingAuthLogin(response) {
- var output;
- console.log(response);
- if (response.user) {
- output = 'Successful login for ' + response.user.display_name;
- } else if (response.error) {
- output = 'Error: ' + response.error;
- }
- document.getElementById('output').innerHTML = output;
- }
- </script>
- </head>
- <body>
- <!-- Place the plugin script -->
- <script type="xing/login">
- {
- "consumer_key": "__MY_CONSUMER_KEY__"
- }
- </script>
- <p id="output">No user logged in.</p>
- <!-- Include the plugin library -->
- <script>(function(d) {
- var js, id='lwx';
- if (d.getElementById(id)) return;
- js = d.createElement('script'); js.id = id; js.src = "https://www.xing-share.com/plugins/login.js";
- d.getElementsByTagName('head')[0].appendChild(js)
- }(document));
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment