Sha256: fc04eb131d019bdfbbe111c998cc35cf1e9aabf7c94716333bda9adc4876fb56

Contents?: true

Size: 1.19 KB

Versions: 1

Compression:

Stored size: 1.19 KB

Contents

module Facebooker
  
   
  class FacebookAdapter < AdapterBase
      
    def canvas_server_base
      "apps.facebook.com"
    end
      
    def api_server_base
       "api.facebook.com"
    end
    
    def video_server_base
      "api-video.facebook.com"
    end
    
    def www_server_base_url
      "www.facebook.com"
    end
    
    def api_rest_path
      "/restserver.php"
    end
    
    def app_id
      ENV['FACEBOOK_APP_ID'] #|| super      
    end
    
    def api_key
      ENV['FACEBOOK_API_KEY'] || super      
    end
    
    def secret_key
      ENV['FACEBOOK_SECRET_KEY'] || super
    end
      
    def is_for?(application_context)
      application_context == :facebook
    end
       
  
       
    def login_url_base
      "http://#{www_server_base_url}/login.php?api_key=#{api_key}&v=1.0"
    end
       
    def install_url_base
      "http://#{www_server_base_url}/install.php?api_key=#{api_key}&v=1.0"
    end

    def connect_permission_url_base
      "http://#{www_server_base_url}/connect/prompt_permissions.php?api_key=#{api_key}&v=1.0"      
    end

    def permission_url_base
      "http://#{www_server_base_url}/authorize.php?api_key=#{api_key}&v=1.0"
    end
    
  end
  
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facebooker-rails3-1.0.64 lib/facebooker/adapters/facebook_adapter.rb