Hardik Dubal
Hardik Dubal

Reputation: 51

Facebook integration with website - logout user from facebook if user doesn't grant permission to the app

I am working with integration of a website with facebook.

I have a specific requirement where-in the user should get logged-out from facebook if he/she doesn't grant permissions to my facebook-app (on first use).

Now, If user denies access for my facebook-app, I am redirected to the redirect_uri, but the problem is that on the page that handles the redirection, I cannot log the user out from facebook since my app won't have permission to perform logout.

Can anyone please tell me what is the workaround I could try?

Upvotes: 2

Views: 350

Answers (2)

Javier
Javier

Reputation: 155

We have exactly the same problem. We've developed a kiosk application used to checkin and post HD photos. If the user does not accept the permissions we need to reload the application because we can't logout the user in another way.

We've tried different ways but no one was successful

Upvotes: 0

C3roe
C3roe

Reputation: 96316

I have a specific requirement where-in the user should get logged-out from facebook if he/she doesn't grant permissions to my facebook-app (on first use).

Is this in a very special environment (like a kiosk application or something) …?

Because otherwise, I’d hate it if random apps logged me out of FB while I’m browsing on my own computer, just because I don’t want to connect to them.

Now, If user denies access for my facebook-app, I am redirected to the redirect_uri, but the problem is that on the page that handles the redirection, I cannot log the user out from facebook since my app won't have permission to perform logout.

Can anyone please tell me what is the workaround I could try?

I don’t know any workaround – to perform a log out on behalf of the user, you need a valid access token – doesn’t matter, if you’re trying to do it client-side or server-side.

If that wasn’t the case, any website I’m visiting could log me out of Facebook, and that would be really annoying to users.

Upvotes: 1

Related Questions