Sha256: ef4890b95fd36dc2b5072ec3c46830eabfa13c184d951af976a89d91036a14a7

Contents?: true

Size: 302 Bytes

Versions: 6

Compression:

Stored size: 302 Bytes

Contents

require 'sinatra'
require 'rest-graph'

app_id = '123'
secret = 'abc'
config = {:app_id => app_id,
          :secret => secret}

post '/' do
  rg = RestGraph.new(config)
  rg.parse_signed_request!(params['signed_request'])
  "#{rg.get('me').inspect.gsub('<', '&lt;')}\n"
end

run Sinatra::Application

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rest-graph-2.0.3 example/sinatra/config.ru
rest-graph-2.0.2 example/sinatra/config.ru
rest-graph-2.0.1 example/sinatra/config.ru
rest-graph-2.0.0 example/sinatra/config.ru
rest-graph-1.9.1 example/sinatra/config.ru
rest-graph-1.9.0 example/sinatra/config.ru