Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here i am going to write step by step procedure for this.</p> <ol> <li>You need to login into developers section of fb using this <a href="https://developers.facebook.com/" rel="nofollow noreferrer">link.</a></li> <li>Create New Application by clicking this <a href="https://developers.facebook.com/apps" rel="nofollow noreferrer">link</a>.</li> <li><p>Write Name of your required application i.e login , test etc etc as you can see it from screen shot given below</p></li> <li><p>Fill the necessary text box values , please see screen shot for this, Now you are done with steps of making login application on developers account , open visual studio and make a page of asp.net with extension of aspx in visual studio.</p></li> <li><p>copy and paste below code of javascript into head section of your page.</p></li> </ol> <pre><code>&lt;script&gt; // Load the SDK Asynchronously (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: '155578484623690', // Write your own application id channelUrl: '//' + window.location.hostname + '/channel', // Path to your Channel File scope: 'id,name,gender,user_birthday,email', 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 var uid = "http://graph.facebook.com/" + response.authResponse.userID + "/picture"; FB.api('/me', function (me) { if (me.name) { document.getElementById('auth-displayname').innerHTML = me.name; document.getElementById('Email').innerHTML = me.email; document.getElementById('BD').innerHTML = me.birthday; document.getElementById('profileImg').src = uid; document.getElementById('Gender').innerHTML = me.gender; } }) 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(); }); }); } &lt;/script&gt; </code></pre> <ol start="6"> <li><p>Copy and paste given below html in body section of your html page</p> <p></p> <pre><code> &lt;div style="height: 500px; margin-left: 23px;"&gt; &lt;h1&gt; Facebook Login Authentication Example&lt;/h1&gt; &lt;div id="auth-status"&gt; &lt;div id="auth-loggedout"&gt; &lt;div class="fb-login-button" autologoutlink="true" scope="email,user_checkins"&gt; Login with Facebook&lt;/div&gt; &lt;/div&gt; &lt;div id="auth-loggedin" style="display: none"&gt; Hi, &lt;span id="auth-displayname"&gt;&lt;/span&gt;(&lt;a href="#" id="auth-logoutlink"&gt;logout&lt;/a&gt;) &lt;br /&gt; Email: &lt;span id="Email"&gt;&lt;/span&gt;&lt;br/&gt; Ammar's Birthday &lt;span id="BD"&gt;&lt;/span&gt;&lt;br/&gt; Gender :&lt;span id="Gender"&gt;&lt;/span&gt;&lt;br/&gt; &lt;br /&gt; Profile Image: &lt;img id="profileImg" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p></p></li> </ol> <p>Now run your asp.net page and you will get your required Information. Here i got display name,birthday , email address, gender and image </p> <p>see final screen shot and enjoy with this in your own way :)</p> <p><img src="https://i.stack.imgur.com/TijIO.jpg" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/X6YO0.jpg" alt="Write name of Application"></p> <p><img src="https://i.stack.imgur.com/cbPHv.jpg" alt="Fill Necessary Text Boxes"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload