Facebook connect logout using link -


customer can sign in web app via normal login , facebook connect. far good.

<fb:login-button autologoutlink="true" perms="email,user_birthday,status_update,publish_stream"></fb:login-button>                                                  <div id="fb-root"></div> <script src="http://connect.facebook.net/en_us/all.js"></script> <script>       fb.init({appid: '<xsl:value-of select="$facebook_app_id" />', status: true,                cookie: true, xfbml: true});                 fb.event.subscribe('auth.login', function(response) {                 window.location.reload();       }); </script> 

but when come logout, want customer click on logoff link @ website. how can programmatically logout facebook connect? possibly via json backend?

i don't want customer click facebook button logoff.

i did try out ways, example: reset facebook connect cookie created @ website , works, when try login facebook again @ second time, fails.

i know delete cookie logout not clean (fb autologoutlink=true still showing haven't logout.)

i can't let customer click logout twice, want them use web app logout link single logout controller.

i using asp classic. solution?

if user has logged in via facebook, call js snippet when user logs out of site (depending on how implement logout, 1 possible way use onclick="", or if redirect "logged out" template, include there):

<div id="fb-root"></div> <script>   window.fbasyncinit = function() {     fb.init({appid: 'your_app_id', status: true, cookie: true, xfbml: true});     fb.logout(function(response) {});   };   (function() {     var e = document.createelement('script'); e.async = true;     e.src = document.location.protocol + '//connect.facebook.net/en_us/all.js';     document.getelementbyid('fb-root').appendchild(e);   }()); </script> 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -