Open MSex opened 10 years ago
I'll try to submit a pull request later
I just sent a pull request (#366)
Thanks, that's a really good observation and summary of the problem. I should've realized this would come up when I modified the hash in place. I'm merging in the PR now and will release a 1.10 RC today.
When you pass a hash to some of the Koala::Facebook::API methods a key is added to this hash with the access token.
The core problem
The PARAMETERS hash in the end will be
Why it is a pratical problem (and not just a philosophical one)
In the end data_user_2 contains data about user 1 because PARAMETERS have the user 1 token.
In our web application, with each request we get an access token. But PARAMETERS is a constant and, as so, is shared between requests.
Workaround
With every call use a new hash instance
How to fix it
I think the problem is in the Koala::Facebook::API.api method.