Class: FacebookQuery
- Inherits:
-
Object
- Object
- FacebookQuery
- Includes:
- FacebookHttp
- Defined in:
- lib/fbauth/query.rb
Constant Summary collapse
- FB_API_URL =
"https://api.facebook.com/method/fql.query"
Instance Method Summary collapse
- #fql(query, options = {}) ⇒ Object
-
#initialize(access_token = nil, options = {}) ⇒ FacebookQuery
constructor
A new instance of FacebookQuery.
Methods included from FacebookHttp
#build_get_url, #build_query_string, #caching_enabled?, #get, #has_access_token?, #logger, #merged_options, #post
Constructor Details
#initialize(access_token = nil, options = {}) ⇒ FacebookQuery
Returns a new instance of FacebookQuery.
8 9 10 11 |
# File 'lib/fbauth/query.rb', line 8 def initialize(access_token = nil, = {}) @options = .merge({ :access_token => access_token }) @options.merge!({ :format => "JSON" }) unless @options.has_key?(:format) end |
Instance Method Details
#fql(query, options = {}) ⇒ Object
13 14 15 |
# File 'lib/fbauth/query.rb', line 13 def fql(query, = {}) get FB_API_URL, (.merge({ :query => query })) end |