I am writing a simple procedure that automatically makes a facebook post. From what I understand, I need to have a "user access token" to do this. I am using Koala (but the philosophy is similar for other libraries). Anyway, I create a new OAuth account:
@oauth = Koala::Facebook::OAuth.new(app_id, app_secret, callback_url)
The koala instructions then become somewhat unclear. The next two lines are:
@oauth.url_for_oauth_code # generate authenticating URL
@oauth.get_access_token(code) # fetch the access token once you have the code
Where does the "code" variable come from? It doesn't say in the documentation. Also, does the "get_access_token" method get an "app access token" or a "user_access_token"? The method name is not clear. I tried going to the url that the [url_for_oauth_code] method gave me, but it gives me no code! Where does the "code" variable come from?