Open gaqzi opened 11 years ago
I'm uncertain right now, but if the access token is optional, it shouldn't be passed in as a blank string.
params = args or {}
if hasattr(self, 'access_token'):
params['access_token'] = self.access_token
mm, all for adding it in that way. Since the token isn't strictly speaking necessary for every request, just that for most we do it is.
Ah you mean if we say want to make an anonymous or unauthed request, yes? That seems reasonable. I just made the assumption the access token would be there.
I was reusing the mixin for a model that didn't have its own access_token
but rather used one from a relationship. It had to do with not being able to pull public data from pages with adult themes.
Wouldn't be better to use get_access_token()
in that case and let the model override it?
That is a much, much better idea. :)
The
FacebookRequestMixin
depends on theaccess_token
field. Are there any good reasons to strictly depend on it? Or would it be ok if I just made the code: