Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>i have found a solution use this code it may help you</p> <pre> <p>&lt;html&gt;<br /> &lt;head&gt;&lt;/head&gt;<br /> &lt;body&gt;<br /> &lt;a href=&quot;javascript:void(0)&quot; id=&quot;login&quot;&gt;Connect My Account With Facebook&lt;/a&gt;<br /> &lt;br&gt;<br /> &lt;a href=&quot;javascript:void(0)&quot; id=&quot;logout&quot;&gt;logout Facebook&lt;/a&gt;<br /> &lt;br /&gt;<br /> &lt;div id='user-info'&gt;&lt;/div&gt;</p> <p>&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;</p> <p>&lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;<br /> &lt;script src=&quot;http://connect.facebook.net/en_US/all.js&quot;&gt;&lt;/script&gt;<br /> &lt;script type=&quot;text/javascript&quot;&gt;</p> <p> // initialize the library with the API key<br /> FB.init({ apiKey: 'da21de4c85b58a0a510267aca5e17449',appId:'139950472740638'});<br /> <br /> // fetch the status on load<br /> FB.getLoginStatus(handleSessionResponse);<br /> <br /> $('#login').bind('click', function(){FB.login(handleSessionResponse);});<br /> <br /> $('#logout').bind('click', function() {FB.logout(handleSessionResponse);});<br /> <br /> $('#disconnect').bind('click', function() {<br /> FB.api({ method: 'Auth.revokeAuthorization' }, function(response) {<br /> clearDisplay();<br /> });<br /> });<br /> <br /> <br /> <br /> // handle a session response from any of the auth related calls<br /> function handleSessionResponse(response) <br /> {<br /> // if we dont have a session, just hide the user info<br /> if (!response.session) {clearDisplay(); return;}<br /> <br /> FB.ui({<br /> method: 'permissions.request',<br /> perms: 'email' <br /> },<br /> function (response)<br /> {<br /> FB.api({<br /> method: 'fql.query', <br /> query: 'SELECT name,email,uid FROM user WHERE uid=' + FB.getSession().uid <br /> },<br /> function(response2) <br /> {<br /> var user = response2[0]; <br /> $('#user-info').html(user.name +' -- '+ user.email +' -- '+ user.uid).show('fast'); <br /> }<br /> );<br /> }<br /> <br /> ); <br /> <br /> }<br /> &lt;/script&gt;<br /> </p> <p>&lt;/body&gt;<br /> &lt;/html&gt;<br /> </p> </pre>
    singulars
    1. This table or related slice is empty.
    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. 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