|
07. 11. 2011. | #1 |
mV
Certified
Datum učlanjenja: 22.08.2009
Lokacija: Novi Sad
Poruke: 67
Hvala: 0
16 "Hvala" u 13 poruka
|
Ako mora tako onda bih ja brzo popizdeo na taj sajt.
Postoji nekoliko sajtova na kojima sam stalno ulogovan (FB,DTP,ES,...) jer ih često obilazim, i ako bih se ulogovao kod tebe i posle logout-a morao ručno da se logujem na FB verovatno se ne bih više vraćao. Loš UX.
__________________
Quis custodiet ipsos custodies ? |
08. 11. 2011. | #2 |
nobody
Expert
Datum učlanjenja: 19.04.2007
Poruke: 537
Hvala: 14
705 "Hvala" u 106 poruka
|
Izgleda da FB policy (tačka 6) nameće da, ako hoćeš da izloguješ korisnika iz svoje aplikacije, moraš da ga izloguješ i sa FB-a. E, da, all your base are belong to us.
@kickloop Da li si video ovo? Poslednja izmena od nn.nn : 08. 11. 2011. u 09:14. |
08. 11. 2011. | #3 |
profesionalac
Qualified
Datum učlanjenja: 02.05.2009
Poruke: 193
Hvala: 27
8 "Hvala" u 6 poruka
|
Mozda je ovo neko resenje:
HTML kôd:
<!doctype html> <html xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Connect JavaScript - jQuery Login Example</title> </head> <body> <h1>Connect JavaScript - jQuery Login Example</h1> <div> <button id="login">Login</button> <button id="disconnect">Disconnect</button> </div> <div id="user-info" style="display: none;"></div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> // initialize the library with the API key FB.init({ apiKey: 'API_KEY' }); // fetch the status on load // FB.getLoginStatus(handleSessionResponse); $('#login').bind('click', function() { FB.login(handleSessionResponse); }); $('#logout').bind('click', function() { FB.logout(handleSessionResponse); }); $('#disconnect').bind('click', function() { FB.api({ method: 'Auth.revokeAuthorization' }, function(response) { clearDisplay(); }); }); // no user, clear display function clearDisplay() { $('#user-info').hide('fast'); } // handle a session response from any of the auth related calls function handleSessionResponse(response) { // if we dont have a session, just hide the user info if (!response.session) { clearDisplay(); return; } // if we have a session, query for the user's profile picture and name FB.api( { method: 'fql.query', query: 'SELECT pic, name FROM profile WHERE id=' + FB.getSession().uid }, function(response) { var user = response[0]; $('#user-info').html('<img src="' + user.pic + '"><br>' + user.id).show('fast'); } ); } </script> </body> </html> |
|
|