i can't logout a user when it's connected through facebook connect.
I'm using the facebook developer toolkit.
Anyone know how to "disconnect" a user ?
There are functions to logout a user:
FB.Connect.logout
and
FB.Connect.logoutAndRedirect
These calls log the user out of both your site and Facebook. The latter method also redirects the user once the logout dialog closes.
You might want to checkout this thread as well:
How to log out users using Facebook Connect in PHP and Zend?
I use the javascript function FB.Connect.logoutAndRedirect; The redirect sends them to somewhere we can kill the session on our side.
Related
I started using the Telegram Widget API, and it works great, but I couldn't find any info on how to logout an user afterwards.
This might be useful if the user decides he wants to use a different telegram account.
Once you click the login button you get redirected to oauth.telegram.org, and if the authorization is already given you won't have the chance to logout.
The only way I found to work is the obvious approach of manually removing the cookies set to oauth.telegram.org, or to click logout on the top right corner of the authorization page, that won't show up if the authorization was already given...
SampleBot Login
By checking the code you can see how the logout is performed:
Logout function
However, you would always need that hash for the link to work.
Then you always have the option to disconnect from telegram itself:
Telegram disconnect
Is there any programmatic way to achieve this?
Thanks
Can i log in to my Facebook account (Knowing user id and password), in the server using Facebook php-sdk, and without need to click any URL?
If yes, please explain.
It is against Facebook's Terms of Service to use a user's email address and password to login to their account. You should instead use the Facebook API to achieve this, but it requires manual login by a user.
There are ways of achieving automatic login using credentials, but since it's not allowed, I won't go into detail. Facebook also detects and prevents most of the common method of auto-login.
I am using Google+ SignIn in my website, and utilizing server-side SignIn flow, as documented here.
After sending token to my server, i manage the User Session, by my own code and SignIn button or Script, doesn't appear in subsequent pages.
However, i have a logout button, that takes user out, but i don't know how to logout him, from Google+ at same time, preferably on my logut page.
NOTE: I want to logout user from my app, not the Google Services.
We don't think it's a good experience for your site to be able to log the user out of all Google services. Consider how annoying it would be for a user if all of their Google tabs (like GMail and Youtube) stopped working because they clicked a button your site.
We think you should offer a logout button that logs the user out of just your site.
How can i found in an iframe application whether the user is already logged in or not.
I am initially authorizing the user and got the access token and store the fb profile id in Session variable. But i am not able to find out if a user logged out from facebook after that.
Can someone help me to find out how we can do this?
You would use the Facebook Javascript SDK and call FB.getLoginStatus(). Another option would be to call the Facebook graph api with the access token you are storing in session and see if that access token is still valid.
How can I logout or disconnect a Facebook user in the Facebook connect session?
I'm using the Facebook developer toolkit. After using "connectSession.Logout()", the method "connectSession.IsConnected()" is still returning "true". Have I done something wrong?
EDIT: Now, I know that you can't logout a user just from the Facebook connect site. A user can be logged out only from the entire Facebook site. How can I do that with Facebook Developer Toolkit?
Edit:
In answer to your second question, just log them out using the JavaScript SDK:
FB.logout(function(response)
{
// user is logged out
// redirect to local logout script
});
Here's also an answer I made before that should help. This answer is for the older javascript and php SDK, but it should still apply.
How to log out users using Facebook Connect in PHP and Zend?