Use default app access token in API
ArmandoAssuncao opened this issue · comments
Hi,
I was trying to use the default app_access_token in the Koala::Facebook::API
and saw that it is not possible.
Then I looked at the code:
Line 95 in 3c7037e
I saw that args["access_token"]
is only assigned by the @access_token
. The @app_access_token
will never be assigned because it does not start.
So I think it should look like this:
args["access_token"] ||= Koala.config.access_token || Koala.config.app_access_token if @access_token || Koala.config.app_access_token
Thus, if @access_token
is not defined at initialize()
, it will use Koala.config.access_token
or Koala.config.app_access_token
.
What do you think?