Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use multiple credentials due to access token having global state #28

Open
kurko opened this issue Jun 21, 2018 · 0 comments
Open

Comments

@kurko
Copy link

kurko commented Jun 21, 2018

By having

FacebookAds.access_token = '[YOUR_ACCESS_TOKEN]'

we aren't able to manage multiple accounts on behalf of our clients because the .access_token set its value as a global state, at the class level.

Ideal way would be instantiating FacebookAds with the access token, e.g

client1 = FacebookAds.new(access_token: '[ACCESS_TOKEN1]')
client2 = FacebookAds.new(access_token: '[ACCESS_TOKEN2]')

Is there a workaround with the current code? Or any suggestion on how to proceed?

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant