20 10 / 2011
How to add scope/permissions to a facebook app when using Koala gem
I keep forgetting it again and again and spend too much time searching for it on google with no success, and finally look at the source code. Then I think that why didn’t I look at the source code in the first place, and why do I most of the times rely on google to solve the problem……what if there was no GOOGLE….. ;)
So here it is…a step in that direction (self help, and maybe help for others whose first instinct is to search on google), for the record:
Koala::Facebook::OAuth.new(app_id, app_secret, callback_url).url_for_oauth_code(:permissions => “email,publish_stream”)
You need to pass the scope as an argument to url_for_oauth_code method.
And for anyone who wants to realize how easy it was if my first instict was to look at the source, here goes the source code: