AccessToken changes between calls
With the Facebook C# SDK, are you supposed to create an instance many times?
app = new Facebook.FacebookApp();
When I do, i get a new accessToken in the session and then i get an error
{"Error validating access token."}
Has anyone seen this?
12/7/2010 - Update on this error. I'm able to replicate this. It is related to login in and out with two user accounts and keeping the checkbox for "Keep me logged in" selected.
I have modified the Facebook.Samples.MvcFacebookApp given with the SDK to reproduce. Nathan if there is a way i can send you this or post it somewhere let me know.
How to re开发者_开发技巧plicate while debugging in Visual Studio (running localhost on port 8181)
Login with User 1 with "Keep me logged in" selected.
Make calls to the Graph API (like getting user information) - this should prompt for granting permissions.
Log out.
Stop debugging
Run project and log in with User 2 with "Keep me logged in" selected.
IMPORTANT: This user is new to app and you would expect for the permissions prompt that never will show.Perform same action that calls Graph API to get user info (name, picture, etc.) as before with this user.
You get the 'Error Validating access token' message.
You can create an instance of FacebookApp with the default constructor as long as you are in the context of an HttpRequest to read the access token.
There shouldn't be a problem with what you are doing, but if you include more code I could be more specific.
精彩评论