ruby-on-railsfacebookkoalakoala-gem

Ruby on Rails view Facebook Event without user login


I'm putting together a website which displays Facebook events using Ruby on Rails and Koala.

I can display an event just fine if I do the following:

graph = Koala::Facebook::API.new(auth_token)
fb_event = graph.get_object(some_event_id)

But as soon as I change the first line to:

graph = Koala::Facebook::API.new(auth_token)

Ie, without the auth_token, I get an error--> type: OAuthException, code: 104, message: An access token is required to request this resource. [HTTP 400]

I don't want the user to have to be logged in in order to view the event. I know that I don't have to be logged into Facebook to view the event, so I'm sure there must be way to get the event without having to have the user be logged in. Any ideas?


Solution

  • Using WizKid's comment to get me there:

    I went to https://developers.facebook.com/tools/access_token/ I then used my app's "User Token"