Facebook API Errors with "Invalid or Invalid Session Key"

Doing some work with a Facebook / RESTful API connection and for some reason I keep getting this error

Session key invalid or no longer valid

As far as I can authenticate correctly. Retrieving a session key from a cookie after opening a dialog to connect to facebook and user logging in. Then I will open the advanced permissions dialog to allow sending messages and offline access.

But then, if the user had to log out of facebook, the session key becomes unusable. What am I doing wrong here? Are there any good examples of this with ASP.NET/C#?

+3
source share
1 answer

Facebook Dev Toolkit v3.0 . . .

:

url = @"http://www.facebook.com/login.php?api_key=" + _fbService.Session.ApplicationKey + @"&v=1.0" + @"&next=" + fullReturnUrl + "?";

url = @"http://www.facebook.com/connect/prompt_permissions.php?api_key=" + _fbService.Session.ApplicationKey + @"&v=1.0&next=" + fullReturnUrl + "?xxRESULTTOKENxx" + @"&display=popup&" + @"&ext_perm=offline_access,publish_stream,read_stream" + @"&enable_profile_selector=1";

, auth_token

string authToken = webContext.Request["auth_token"];

, Facebook.

+1

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


All Articles