Socialid.login.logoutWithFacebook
From Social ID Developers
Contents |
Description
API to logout the user previously logged in by the Facebook Automatic Login.
This API also logs out the user from Facebook, since it uses the FB.logout() API from Facebook Javascript SDK. Thus, the user can not perform the Facebook Automatic Login again until he log back on the social network.
Usage
socialid.login.logoutWithFacebook(handler)
Parameters
handler | optional | Callback function to handle the API response. |
---|
API Response
data | Always "null". This API does not return data. | status | The API response status. Can be success, if logout the user successfully, or not_found, if there is no user logged in the current login session. |
---|
Example
Logout the user from the current login session (and also from Facebook):
socialid.login.init(1); var handler = function(response) { if (response.status == "success") { alert("You have been logged out successfully!"); } else { alert("Could not log out."); } } socialid.login.logoutWithFacebook(handler);
You can test this parameters in our playground: https://sid-examples.herokuapp.com/social_logins/playground