I have a fully functional FQL query, but when it is triggered for the second time i get an error code 102: Requires user session
On my app i have an Autocomplete S
The reason this is likely happening is because of the December 5, 2012 "Breaking Changes" that Facebook has rolled out. Specifically:
New security restrictions for OAuth authorization codes
We will only allow authorization codes to be exchanged for access tokens once and will require that they be exchanged for an access token within 10 minutes of their creation. This is in line with the OAuth 2.0 Spec which from the start has stated that "authorization codes MUST be short lived and single use". For more information, check out our Authentication documentation.
This is why your first request works, your second doesn't. On the 2nd attempt, the SDK attempts to exchange your the user's auth code for an access token. But due to these changes, this can only be done once. Your code looks like it should be working properly, since you are explicitly saving and then setting the access_token
after you first receive it. Make sure that that is the case (confirm that the $_SESSION var is being saved/retrieved properly). If for some reason it is not, the 102 error is what you will see.
Cheers