<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <head runat="server"> <title></title> <%--<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>--%> <script src="//connect.facebook.net/en_US/all.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script type="text/javascript" src="jquery.maphilight.min.js"></script> </head> <body style="background-color:azure"> <script type="text/javascript"> (function (d) { var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) { return; } js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; ref.parentNode.insertBefore(js, ref); }(document)); // Init the SDK upon load window.fbAsyncInit = function () { FB.init({ appId: '487818951287950', // App ID channelUrl: '//' + window.location.hostname + '/channel', // Path to your Channel File status: true, // check login status cookie: true, // enable cookies to allow the server to access the session xfbml: true // parse XFBML }); // listen for and handle auth.statusChange events FB.Event.subscribe('auth.statusChange', function (response) { if (response.authResponse) { // user has auth'd your app and is logged into Facebook FB.api('/me', function (me) { if (me.name) { document.getElementById('auth-displayname').innerHTML = me.name; } }) document.getElementById('auth-loggedout').style.display = 'none'; document.getElementById('auth-loggedin').style.display = 'block'; } else { // user has not auth'd your app, or is not logged into Facebook document.getElementById('auth-loggedout').style.display = 'block'; document.getElementById('auth-loggedin').style.display = 'none'; } }); $("#auth-logoutlink").click(function () { FB.logout(function () { window.location.reload(); }); }); } </script> <form id="form1" runat="server"> <div class="fb-login-button" id="fbkopce" runat="server"> <div id="auth-status" > <div id="auth-loggedout" > <fb:login-button class="fb-login-button" autologoutlink="true" scope="email,user_checkins">Најави се Facebook</fb:login-button> </div> <div id="auth-loggedin" style="display: none"> Добредојде, <span id="auth-displayname"></span>(<a href="#" id="auth-logoutlink">одјави се</a>) </div> </div> </div> <asp:TextBox ID="TextBox3" runat="server" Height="22px">username</asp:TextBox> <br/> <asp:TextBox ID="TextBox4" runat="server" TextMode="Password" ToolTip="Password">password</asp:TextBox><br /> <asp:Button ID="Button1" runat="server" Text="Најави се!" OnClick="Button1_Click" /> </form> </body> </html>
style.visibility
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)