I have been struggling to figure this issue out for several weeks, and I just can't figure it out.
I run a Ruby On Rails application that posts to Facebook. The development environment is in Cloud9, and the live site is hosted on Heroku. The application has an appropriate account with Developers.Facebook.com with the full application and the test application associated with it.
I have Heroku settings working great with the full Facebook app.
Problems start with Cloud9 settings in the Facebook testing app. Whenever I try to connect through the API, I get the following error:

Immediately after this error:

I tried using the following parameters for my url but nothing works:
https://{workspace}-{username}.c9.io/ https://{workspace}-{username}.c9.io:80/ https://{workspace}-{username}.c9.io:8080/ https://{workspace}-{username}.c9users.io/ https://{workspace}-{username}.c9users.io:80/ https://{workspace}-{username}.c9users.io:8080/
Here is my FacebookAccount model.
class FacebookAccount < ActiveRecord::Base belongs_to :user has_many :facebook_pages if Rails.env.production? FACEBOOK_APP_ID = ENV["FACEBOOK_APP_ID"] FACEBOOK_SECRET = ENV["FACEBOOK_SECRET"] else FACEBOOK_APP_ID = "XXXXXXXXXXXXXXX" FACEBOOK_SECRET = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" end def self.from_omniauth(auth) oauth = Koala::Facebook::OAuth.new(FACEBOOK_APP_ID, FACEBOOK_SECRET) new_access_info = oauth.exchange_access_token_info auth.credentials.token new_access_token = new_access_info["access_token"] new_access_expires_at = DateTime.now + new_access_info["expires"].to_i.seconds where(provider: auth.provider, uid: auth.uid).first_or_initialize.tap do |facebook_account| facebook_account.provider = auth.provider facebook_account.uid = auth.uid facebook_account.name = auth.info.name facebook_account.image = auth.info.image facebook_account.email = auth.info.email facebook_account.oauth_token = new_access_token facebook_account.oauth_expires_at = new_access_expires_at facebook_account.save! end end end
source share