Facebook Login API - Why Next?

I am writing a Windows Phone 7 application and have accessed Facebook using C # sdk, but logging out turned out to be interesting. I read this post:

Unable to log out of Facebook using Facebook C # SDK

which seems to reflect FB documents that indicate that I should go to

https://www.facebook.com/logout.php?next=[redirect_uri 022&access_token=[token]

However, this does not work and quietly redirects me back to the facebook homepage.

My best guess at the moment is that facebook doesn't like the β€œnext” URI that I provide. I updated the settings of my FB application, but either they have not been distributed yet, or something else does not work.

I have seen messages recommending using InternetSetOption, but this API is not available on the phone.

In my application flow, logging out leads to a different Silverlight page in my application, so I really don't need a browser redirection for my purpose, so I could just β€œforget” the access token, without actually telling FB to invalidate it, but it seems weak and insecure.

So, while I wait more time to find out if application domain changes propagate on FB servers and solve the problem, I have another question:

Why should the Facebook API take care of whether I provide the β€œnext” or not? Can't I just tell them to invalidate the token and do it?

Is there a logical part that I'm missing here?

Thanks!

+4
source share
1 answer

Update: I wrote an open Facebook login / logout control for WP7 that allows this (check out the sample project). It works essentially with a web browser control to go to the logout page and then submit the logout form by injecting javascript into the web browser control. The idea came from this post.

The immediate goal would be to revoke advanced permissions by providing HTTP DELETE for / me / permissions, as described here . Just forgetting that an authentication token is not a bad option, since access tokens are usually only good for an hour or two, unless you ask for offline_access. And if the user is overly concerned, they can delete your application on the settings page on facebook.com.

0
source

Source: https://habr.com/ru/post/1388765/


All Articles