@oauth = Koala::Facebook::OAuth.new(<app_id>, <app_secret>, 'https://site.com/')
code = @oauth.url_for_oauth_code(:permissions => "publish_actions,manage_pages,publish_pages")
=> "https://www.facebook.com/dialog/oauth?client_id=<app_id>&redirect_uri=https%3A%2F%2Fsite.com%2F&scope=publish_actions%2Cmanage_pages%2Cpublish_pages"Open that url in browser and grant access to app. At the end you will be redirected to your website https://site.com/?code=<access_token>. Paste access token here:
@oauth.get_access_token_info(<access_token>)Paste that access token here: