Skip to content

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

@kurko

Description

@kurko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions