class FbGraphApi::Client

Attributes

token[RW]

Public Class Methods

new(token) click to toggle source
# File lib/fb_graph_api/client.rb, line 5
def initialize(token)
  @address       =  'https://graph.facebook.com'
  @acess_token   =   token
end

Public Instance Methods

connection() click to toggle source
# File lib/fb_graph_api/client.rb, line 10
def connection
  Faraday.new(url: @address) do |conn|
    conn.authorization 'Bearer', @acess_token
    conn.request  :json
    conn.response :json,  :content_type => /\bjson$/
    conn.adapter  Faraday.default_adapter
  end
end