Realtime updates internal server error on Heroku using Koala

I am trying to create a subscription for real-time updates using the Koala gem deployed on Heroku. However, when I run the following:

@updates = Koala :: Facebook :: RealtimeUpdates.new (: app_id => APP_ID ,: secret => APP_SECRET) @ updates.subscribe ("user", "feed", CALLBACK_URL, VERIFY_TOKEN)

on the heroku console, I get:

 !   Internal server error

However, when I check the Heroku logs, I don’t see the 500 error. In fact, everything seems to be hunky-dori:

heroku [router]: GET blah-blah-760.heroku.com/facebook_updates/dyno = web.1 queue = 0 wait = 0ms service = 5951ms status = 200 bytes = 10

heroku [nginx]: 66.220.149.250 - - [05 / October / 2011: 11: 55: 11 -0700] "GET / facebook_updates /? hub.mode = subscribe & hub.challenge = 1234567890 & hub.verify_token = XXXXXXX HTTP / 1.0" 200 10 "-" "facebookplatform / 1.0 (+ http://developers.facebook.com)" blah-blah-760.heroku.com

When I insert a GET request into the browser, it correctly selects the hub.challenge parameter.

My controller is as follows:

class FacebookUpdatesController < ApplicationController

  layout nil

  def index #this method responds to the Facebook GET 
    logger.info "about to meet challenge"
    render :text => Koala::Facebook::RealtimeUpdates.meet_challenge(params, VERIFY_TOKEN)
  end

  def create #this method responds to POST messages
    logger.info params
  end

end

My routes are configured as follows:

resources :facebook_updates, :only => [:create, :index]

It seems to me that I'm really close. Any help would be greatly appreciated.

0
source share
1 answer

, @updates.subscribe("user", "feed", CALLBACK_URL, VERIFY_TOKEN) , .

0

All Articles