bobot 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/bobot/page.rb +107 -26
- data/lib/bobot/profile.rb +7 -6
- data/lib/bobot/subscription.rb +9 -8
- data/lib/bobot/version.rb +1 -1
- metadata +47 -59
- data/spec/dummy/log/development.log +0 -47
- data/spec/dummy/log/test.log +0 -189
- data/spec/dummy/tmp/generator/app/bobot/workflow.rb +0 -15
- data/spec/dummy/tmp/generator/config/initializers/bobot.rb +0 -47
- data/spec/dummy/tmp/generator/config/locales/bobot.en.yml +0 -29
- data/spec/dummy/tmp/generator/config/locales/bobot.fr.yml +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 58b906f8a1d4dcba5c891d0c6fa36569a5c8f844
|
4
|
+
data.tar.gz: e526fc50ee71070ebbb1c09719fc6f50447d911a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54e62ee32bf071a5c26d9a3b28b5e2a986cf50c5196f67b1192fb6913e3ad8db01c4aaba9454b16a839af65bf9bbd7a7db41c761e203e82e5e9e1d277896953d
|
7
|
+
data.tar.gz: 72659a607db97a7152eefc7fa413eca5ccc21f046117170ac7410040cc7cc852e576d92cb039ebbec1e0a318e0755940ffe7566a11d77ebdd8ca34a1e929aa42
|
data/lib/bobot/page.rb
CHANGED
@@ -200,35 +200,54 @@ module Bobot
|
|
200
200
|
#
|
201
201
|
#####################################
|
202
202
|
def update_facebook_setup!
|
203
|
-
|
204
|
-
|
203
|
+
puts "- unset_whitelist_domains! [....]"
|
204
|
+
unset_whitelist_domains!
|
205
|
+
puts "- unset_whitelist_domains! [DONE]"
|
206
|
+
puts "- set_whitelist_domains! [....]"
|
205
207
|
set_whitelist_domains!
|
208
|
+
puts "- set_whitelist_domains! [DONE]"
|
209
|
+
puts "- unset_greeting_text! [....]"
|
210
|
+
unset_greeting_text!
|
211
|
+
puts "- unset_greeting_text! [DONE]"
|
212
|
+
puts "- set_greeting_text! [....]"
|
213
|
+
set_greeting_text!
|
214
|
+
puts "- set_greeting_text! [DONE]"
|
215
|
+
puts "- unset_get_started_button! [....]"
|
216
|
+
unset_get_started_button!
|
217
|
+
puts "- unset_get_started_button! [DONE]"
|
218
|
+
puts "- set_get_started_button! [....]"
|
206
219
|
set_get_started_button!
|
220
|
+
puts "- set_get_started_button! [DONE]"
|
221
|
+
puts "- unset_persistent_menu! [....]"
|
222
|
+
unset_persistent_menu!
|
223
|
+
puts "- unset_persistent_menu! [DONE]"
|
224
|
+
puts "- set_persistent_menu! [....]"
|
207
225
|
set_persistent_menu!
|
226
|
+
puts "- set_persistent_menu! [DONE]"
|
227
|
+
puts "- unsubscribe_to_facebook_page! [....]"
|
228
|
+
unsubscribe_to_facebook_page!
|
229
|
+
puts "- unsubscribe_to_facebook_page! [DONE]"
|
230
|
+
puts "- subscribe_to_facebook_page! [....]"
|
231
|
+
subscribe_to_facebook_page!
|
232
|
+
puts "- subscribe_to_facebook_page! [DONE]"
|
208
233
|
end
|
209
234
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
Bobot::Subscription.unset(
|
227
|
-
query: {
|
228
|
-
page_id: page_id,
|
229
|
-
access_token: page_access_token,
|
230
|
-
},
|
231
|
-
)
|
235
|
+
def get_facebook_setup
|
236
|
+
puts "- get_whitelist_domains [....]"
|
237
|
+
puts get_whitelist_domains.inspect
|
238
|
+
puts "- get_whitelist_domains [DONE]"
|
239
|
+
puts "- get_greeting_text [....]"
|
240
|
+
puts get_greeting_text.inspect
|
241
|
+
puts "- get_greeting_text [DONE]"
|
242
|
+
puts "- get_started_button [....]"
|
243
|
+
puts get_started_button.inspect
|
244
|
+
puts "- get_started_button [DONE]"
|
245
|
+
puts "- get_persistent_menu [....]"
|
246
|
+
puts get_persistent_menu.inspect
|
247
|
+
puts "- get_persistent_menu [DONE]"
|
248
|
+
puts "- subscribed_facebook_pages [....]"
|
249
|
+
puts subscribed_facebook_pages.inspect
|
250
|
+
puts "- subscribed_facebook_pages [DONE]"
|
232
251
|
end
|
233
252
|
|
234
253
|
## == Set bot description (only displayed on first time). ==
|
@@ -273,6 +292,13 @@ module Bobot
|
|
273
292
|
)
|
274
293
|
end
|
275
294
|
|
295
|
+
def get_greeting_text
|
296
|
+
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
297
|
+
Bobot::Profile.get(
|
298
|
+
query: { access_token: page_access_token, fields: %w[greeting] },
|
299
|
+
)
|
300
|
+
end
|
301
|
+
|
276
302
|
## == Set bot whitelist domains (only displayed on first time) ==
|
277
303
|
## == Some features like Messenger Extensions and Checkbox Plugin require ==
|
278
304
|
## == a page to specify a domain whitelist. ==
|
@@ -288,11 +314,18 @@ module Bobot
|
|
288
314
|
def unset_whitelist_domains!
|
289
315
|
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
290
316
|
Bobot::Profile.unset(
|
291
|
-
body: { fields: [
|
317
|
+
body: { fields: %w[whitelisted_domains] },
|
292
318
|
query: { access_token: page_access_token },
|
293
319
|
)
|
294
320
|
end
|
295
321
|
|
322
|
+
def get_whitelist_domains
|
323
|
+
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
324
|
+
Bobot::Profile.get(
|
325
|
+
query: { access_token: page_access_token, fields: %w[whitelisted_domains] },
|
326
|
+
)
|
327
|
+
end
|
328
|
+
|
296
329
|
## == You can define the action to trigger when new humans click on ==
|
297
330
|
## == the Get Started button. Before doing it you should check to select the ==
|
298
331
|
## == messaging_postbacks field when setting up your webhook. ==
|
@@ -312,6 +345,13 @@ module Bobot
|
|
312
345
|
query: { access_token: page_access_token },
|
313
346
|
)
|
314
347
|
end
|
348
|
+
|
349
|
+
def get_started_button
|
350
|
+
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
351
|
+
Bobot::Profile.get(
|
352
|
+
query: { access_token: page_access_token, fields: %w[get_started] },
|
353
|
+
)
|
354
|
+
end
|
315
355
|
|
316
356
|
## == You can show a persistent menu to humans. ==
|
317
357
|
## == If you want to have a persistent menu, you have to set get_started ==
|
@@ -368,9 +408,50 @@ module Bobot
|
|
368
408
|
def unset_persistent_menu!
|
369
409
|
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
370
410
|
Bobot::Profile.unset(
|
371
|
-
body: { fields: [
|
411
|
+
body: { fields: %w[persistent_menu] },
|
372
412
|
query: { access_token: page_access_token },
|
373
413
|
)
|
374
414
|
end
|
415
|
+
|
416
|
+
def get_persistent_menu
|
417
|
+
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
418
|
+
Bobot::Profile.get(
|
419
|
+
query: { access_token: page_access_token, fields: %w[persistent_menu] },
|
420
|
+
)
|
421
|
+
end
|
422
|
+
|
423
|
+
## == Subcribe your bot to your page ==
|
424
|
+
def subscribe_to_facebook_page!
|
425
|
+
raise Bobot::FieldFormat.new("page_id is required") unless page_id.present?
|
426
|
+
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
427
|
+
Bobot::Subscription.set(
|
428
|
+
query: {
|
429
|
+
page_id: page_id,
|
430
|
+
access_token: page_access_token,
|
431
|
+
},
|
432
|
+
)
|
433
|
+
end
|
434
|
+
|
435
|
+
## == Unsubcribe your bot from your page ==
|
436
|
+
def unsubscribe_to_facebook_page!
|
437
|
+
raise Bobot::FieldFormat.new("page_id is required") unless page_id.present?
|
438
|
+
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
439
|
+
Bobot::Subscription.unset(
|
440
|
+
query: {
|
441
|
+
page_id: page_id,
|
442
|
+
access_token: page_access_token,
|
443
|
+
},
|
444
|
+
)
|
445
|
+
end
|
446
|
+
|
447
|
+
## == Subcribed pages for your bot ==
|
448
|
+
def subscribed_facebook_pages
|
449
|
+
raise Bobot::FieldFormat.new("access_token is required") unless page_access_token.present?
|
450
|
+
Bobot::Subscription.get(
|
451
|
+
query: {
|
452
|
+
access_token: page_access_token,
|
453
|
+
},
|
454
|
+
)
|
455
|
+
end
|
375
456
|
end
|
376
457
|
end
|
data/lib/bobot/profile.rb
CHANGED
@@ -2,17 +2,18 @@ module Bobot
|
|
2
2
|
module Profile
|
3
3
|
include Bobot::GraphFacebook
|
4
4
|
|
5
|
+
def get(query:)
|
6
|
+
graph_get '/me/messenger_profile', query: query
|
7
|
+
end
|
8
|
+
module_function :get
|
9
|
+
|
5
10
|
def set(body:, query:)
|
6
|
-
graph_post '/me/messenger_profile', body: body, query:
|
7
|
-
access_token: query.fetch(:access_token),
|
8
|
-
}
|
11
|
+
graph_post '/me/messenger_profile', body: body, query: query
|
9
12
|
end
|
10
13
|
module_function :set
|
11
14
|
|
12
15
|
def unset(body:, query:)
|
13
|
-
graph_delete '/me/messenger_profile', body: body, query:
|
14
|
-
access_token: query.fetch(:access_token),
|
15
|
-
}
|
16
|
+
graph_delete '/me/messenger_profile', body: body, query: query
|
16
17
|
end
|
17
18
|
module_function :unset
|
18
19
|
end
|
data/lib/bobot/subscription.rb
CHANGED
@@ -2,17 +2,18 @@ module Bobot
|
|
2
2
|
module Subscription
|
3
3
|
include Bobot::GraphFacebook
|
4
4
|
|
5
|
-
def
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
def get(query:)
|
6
|
+
graph_get "/me/subscribed_apps", query: query
|
7
|
+
end
|
8
|
+
module_function :get
|
9
|
+
|
10
|
+
def set(query:)
|
11
|
+
graph_post "/#{query.fetch(:page_id)}/subscribed_apps", query: query
|
9
12
|
end
|
10
13
|
module_function :set
|
11
14
|
|
12
|
-
def unset(query:
|
13
|
-
graph_delete "/#{query.fetch(:page_id)}/subscribed_apps", query:
|
14
|
-
access_token: query.fetch(:access_token),
|
15
|
-
}
|
15
|
+
def unset(query:)
|
16
|
+
graph_delete "/#{query.fetch(:page_id)}/subscribed_apps", query: query
|
16
17
|
end
|
17
18
|
module_function :unset
|
18
19
|
end
|
data/lib/bobot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bobot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Navid EMAD
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -165,13 +165,7 @@ files:
|
|
165
165
|
- spec/dummy/config/routes.rb
|
166
166
|
- spec/dummy/config/secrets.yml
|
167
167
|
- spec/dummy/config/spring.rb
|
168
|
-
- spec/dummy/log/development.log
|
169
|
-
- spec/dummy/log/test.log
|
170
168
|
- spec/dummy/public/favicon.ico
|
171
|
-
- spec/dummy/tmp/generator/app/bobot/workflow.rb
|
172
|
-
- spec/dummy/tmp/generator/config/initializers/bobot.rb
|
173
|
-
- spec/dummy/tmp/generator/config/locales/bobot.en.yml
|
174
|
-
- spec/dummy/tmp/generator/config/locales/bobot.fr.yml
|
175
169
|
- spec/examples.txt
|
176
170
|
- spec/helpers/graph_api_helpers.rb
|
177
171
|
- spec/jobs/bobot/commander_job_spec.rb
|
@@ -199,76 +193,70 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
193
|
version: '0'
|
200
194
|
requirements: []
|
201
195
|
rubyforge_project:
|
202
|
-
rubygems_version: 2.
|
196
|
+
rubygems_version: 2.5.2.3
|
203
197
|
signing_key:
|
204
198
|
specification_version: 4
|
205
199
|
summary: Facebook Messenger Bot
|
206
200
|
test_files:
|
207
|
-
- spec/
|
208
|
-
- spec/
|
209
|
-
- spec/
|
210
|
-
- spec/
|
211
|
-
- spec/
|
212
|
-
- spec/
|
213
|
-
- spec/
|
214
|
-
- spec/bobot/event/policy_enforcement_spec.rb
|
215
|
-
- spec/bobot/event/postback_spec.rb
|
216
|
-
- spec/bobot/event/read_spec.rb
|
217
|
-
- spec/bobot/event/referral_spec.rb
|
218
|
-
- spec/bobot/event_spec.rb
|
219
|
-
- spec/bobot/install_generator_spec.rb
|
220
|
-
- spec/bobot/page_spec.rb
|
221
|
-
- spec/bobot/profile_spec.rb
|
222
|
-
- spec/bobot/subscription_spec.rb
|
223
|
-
- spec/bobot/user_spec.rb
|
224
|
-
- spec/controllers/bobot/application_controller_spec.rb
|
225
|
-
- spec/controllers/bobot/webhook_controller_spec.rb
|
201
|
+
- spec/spec_helper.rb
|
202
|
+
- spec/lint/rubocop_spec.rb
|
203
|
+
- spec/dummy/app/mailers/application_mailer.rb
|
204
|
+
- spec/dummy/app/jobs/application_job.rb
|
205
|
+
- spec/dummy/app/controllers/application_controller.rb
|
206
|
+
- spec/dummy/app/views/layouts/mailer.html.erb
|
207
|
+
- spec/dummy/app/views/layouts/mailer.text.erb
|
226
208
|
- spec/dummy/app/assets/config/manifest.js
|
227
209
|
- spec/dummy/app/assets/javascripts/application.js
|
228
210
|
- spec/dummy/app/assets/stylesheets/application.css
|
229
|
-
- spec/dummy/app/channels/application_cable/channel.rb
|
230
211
|
- spec/dummy/app/channels/application_cable/connection.rb
|
231
|
-
- spec/dummy/app/
|
232
|
-
- spec/dummy/
|
233
|
-
- spec/dummy/app/mailers/application_mailer.rb
|
234
|
-
- spec/dummy/app/views/layouts/mailer.html.erb
|
235
|
-
- spec/dummy/app/views/layouts/mailer.text.erb
|
236
|
-
- spec/dummy/bin/bundle
|
237
|
-
- spec/dummy/bin/rails
|
212
|
+
- spec/dummy/app/channels/application_cable/channel.rb
|
213
|
+
- spec/dummy/bin/update
|
238
214
|
- spec/dummy/bin/rake
|
239
215
|
- spec/dummy/bin/setup
|
240
|
-
- spec/dummy/bin/
|
241
|
-
- spec/dummy/
|
242
|
-
- spec/dummy/config/
|
216
|
+
- spec/dummy/bin/bundle
|
217
|
+
- spec/dummy/bin/rails
|
218
|
+
- spec/dummy/config/secrets.yml
|
219
|
+
- spec/dummy/config/routes.rb
|
220
|
+
- spec/dummy/config/locales/en.yml
|
243
221
|
- spec/dummy/config/cable.yml
|
244
|
-
- spec/dummy/config/environment.rb
|
245
|
-
- spec/dummy/config/environments/development.rb
|
246
222
|
- spec/dummy/config/environments/production.rb
|
223
|
+
- spec/dummy/config/environments/development.rb
|
247
224
|
- spec/dummy/config/environments/test.rb
|
225
|
+
- spec/dummy/config/spring.rb
|
226
|
+
- spec/dummy/config/environment.rb
|
227
|
+
- spec/dummy/config/application.rb
|
228
|
+
- spec/dummy/config/puma.rb
|
229
|
+
- spec/dummy/config/boot.rb
|
248
230
|
- spec/dummy/config/initializers/application_controller_renderer.rb
|
249
231
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
250
|
-
- spec/dummy/config/initializers/cors.rb
|
251
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
252
|
-
- spec/dummy/config/initializers/inflections.rb
|
253
232
|
- spec/dummy/config/initializers/mime_types.rb
|
233
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
254
234
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
255
|
-
- spec/dummy/config/
|
256
|
-
- spec/dummy/config/
|
257
|
-
- spec/dummy/config/routes.rb
|
258
|
-
- spec/dummy/config/secrets.yml
|
259
|
-
- spec/dummy/config/spring.rb
|
235
|
+
- spec/dummy/config/initializers/inflections.rb
|
236
|
+
- spec/dummy/config/initializers/cors.rb
|
260
237
|
- spec/dummy/config.ru
|
261
|
-
- spec/dummy/log/development.log
|
262
|
-
- spec/dummy/log/test.log
|
263
|
-
- spec/dummy/public/favicon.ico
|
264
238
|
- spec/dummy/Rakefile
|
265
|
-
- spec/dummy/
|
266
|
-
- spec/dummy/tmp/generator/config/initializers/bobot.rb
|
267
|
-
- spec/dummy/tmp/generator/config/locales/bobot.en.yml
|
268
|
-
- spec/dummy/tmp/generator/config/locales/bobot.fr.yml
|
239
|
+
- spec/dummy/public/favicon.ico
|
269
240
|
- spec/examples.txt
|
270
|
-
- spec/
|
241
|
+
- spec/bobot/install_generator_spec.rb
|
242
|
+
- spec/bobot/bobot_spec.rb
|
243
|
+
- spec/bobot/page_spec.rb
|
244
|
+
- spec/bobot/subscription_spec.rb
|
245
|
+
- spec/bobot/event_spec.rb
|
246
|
+
- spec/bobot/profile_spec.rb
|
247
|
+
- spec/bobot/user_spec.rb
|
248
|
+
- spec/bobot/event/delivery_spec.rb
|
249
|
+
- spec/bobot/event/policy_enforcement_spec.rb
|
250
|
+
- spec/bobot/event/message_echo_spec.rb
|
251
|
+
- spec/bobot/event/optin_spec.rb
|
252
|
+
- spec/bobot/event/account_linking_spec.rb
|
253
|
+
- spec/bobot/event/message_spec.rb
|
254
|
+
- spec/bobot/event/referral_spec.rb
|
255
|
+
- spec/bobot/event/common_spec.rb
|
256
|
+
- spec/bobot/event/postback_spec.rb
|
257
|
+
- spec/bobot/event/read_spec.rb
|
271
258
|
- spec/jobs/bobot/commander_job_spec.rb
|
272
|
-
- spec/
|
259
|
+
- spec/controllers/bobot/webhook_controller_spec.rb
|
260
|
+
- spec/controllers/bobot/application_controller_spec.rb
|
273
261
|
- spec/rails_helper.rb
|
274
|
-
- spec/
|
262
|
+
- spec/helpers/graph_api_helpers.rb
|
@@ -1,47 +0,0 @@
|
|
1
|
-
Started GET "/" for 127.0.0.1 at 2017-11-24 11:59:04 +0100
|
2
|
-
Processing by Rails::WelcomeController#index as HTML
|
3
|
-
Rendering /Users/navid/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb
|
4
|
-
Rendered /Users/navid/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb (4.7ms)
|
5
|
-
Completed 200 OK in 15ms (Views: 12.0ms)
|
6
|
-
|
7
|
-
|
8
|
-
Started GET "/favicon.ico" for 127.0.0.1 at 2017-11-24 11:59:04 +0100
|
9
|
-
|
10
|
-
ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
|
11
|
-
|
12
|
-
actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
|
13
|
-
actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
|
14
|
-
railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
|
15
|
-
railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
|
16
|
-
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
|
17
|
-
activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
|
18
|
-
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
|
19
|
-
railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
|
20
|
-
actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
|
21
|
-
actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
|
22
|
-
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
|
23
|
-
activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
|
24
|
-
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
|
25
|
-
actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
|
26
|
-
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
|
27
|
-
railties (5.1.4) lib/rails/engine.rb:522:in `call'
|
28
|
-
rack (2.0.3) lib/rack/handler/webrick.rb:86:in `service'
|
29
|
-
/Users/navid/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
|
30
|
-
/Users/navid/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
|
31
|
-
/Users/navid/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
|
32
|
-
Started GET "/" for 127.0.0.1 at 2017-11-24 12:00:32 +0100
|
33
|
-
Processing by Rails::WelcomeController#index as HTML
|
34
|
-
Rendering /Users/navid/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb
|
35
|
-
Rendered /Users/navid/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb (4.7ms)
|
36
|
-
Completed 200 OK in 13ms (Views: 10.1ms)
|
37
|
-
|
38
|
-
|
39
|
-
Started GET "/" for 127.0.0.1 at 2017-11-24 12:00:33 +0100
|
40
|
-
Processing by Rails::WelcomeController#index as HTML
|
41
|
-
Rendering /Users/navid/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb
|
42
|
-
Rendered /Users/navid/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb (3.5ms)
|
43
|
-
Completed 200 OK in 8ms (Views: 5.7ms)
|
44
|
-
|
45
|
-
|
46
|
-
ETHON: Libcurl initialized
|
47
|
-
ETHON: performed EASY effective_url=https://graph.facebook.com/v2.11//me/messages response_code=400 return_code=ok total_time=3.42639
|
data/spec/dummy/log/test.log
DELETED
@@ -1,189 +0,0 @@
|
|
1
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 8a80c687-421f-4bd4-8bba-a022b265e12f) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
2
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: e295aa69-c9c8-4900-8409-e43a19b6a500) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
3
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 733fbfda-cfcb-4da4-8a4d-5dcd99bf7ad0) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
4
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: abbfb628-82bd-4d48-a102-8720e8fbed91) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
5
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 7e146540-8a7e-4822-8d43-ac07d533e5a9) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
6
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: bb8a0a3f-490a-4427-be91-0c005255d863) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
7
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: e6ad52a0-39eb-47cc-9fad-3177e6f08833) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
8
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 45596508-c8d8-4181-97c7-b8466c788043) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
9
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: f47b59b3-4367-4166-b743-2aa15a158ec1) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
10
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 1bb7fe50-e654-4b7c-aeaa-f4065e9a2cd7) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
11
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: f44a9cce-d7eb-4673-86c1-1314c6779dfe) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
12
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: c90b3096-6f7f-4bc8-9002-19106f3b4df5) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
13
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 974e35d5-7956-453d-9872-d932a4efadfa) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
14
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: d04a2166-9022-438f-b0b6-ecfb156421e0) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
15
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: b82a84cf-78a0-4002-8653-997b81ae9eae) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
16
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 8112f073-6061-428b-9a45-bb6c95b78e03) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
17
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 2140517c-8166-4449-96a0-8c1075712bd1) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
18
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 838d432d-13e4-4449-916c-6bd78c2b19b6) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
19
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 91632611-04b4-4939-bfec-226ed9d46b35) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
20
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: bba22f37-1aca-477b-b7b3-bbaa2886be74) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
21
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: b5aa5a5f-acbe-4cdc-a420-754b65fa0514) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
22
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 9dee2915-2aa3-49c0-a163-0fb1babce1ae) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
23
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 031757ed-ca82-4581-869c-810c286de6f0) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
24
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 1c0de02e-7761-480b-a8ac-87d1613a948b) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
25
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: ce0ebceb-aeea-44d1-b425-7cb3e627c9eb) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
26
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: e1b4f1e1-13d8-4243-948c-c2bbdab9f212) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
27
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 1c5e3b4b-4ae4-4213-bafb-4164a16a0a4c) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
28
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 56732598-6966-4ce2-b00c-0b7632f4a14b) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
29
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 7bdaa668-ea63-4a68-9576-95f2bc8197a9) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
30
|
-
ETHON: Libcurl initialized
|
31
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 6a6034d0-25d7-4aea-93f9-e56f3d212cda) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
32
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 30f17782-94b0-481e-a3f3-f667225b0ecc) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
33
|
-
ETHON: Libcurl initialized
|
34
|
-
ETHON: Libcurl initialized
|
35
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 3128058b-c515-488d-9987-a121b91bfaab) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
36
|
-
ETHON: Libcurl initialized
|
37
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
38
|
-
[DELETE] << {"result"=>"Successfully deleted Get Started button"}
|
39
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
40
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
41
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
42
|
-
[POST] << {"result"=>"Successfully added Get Started button"}
|
43
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
44
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
45
|
-
[GET] >> https://graph.facebook.com/v2.11/5660527900
|
46
|
-
[GET] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
47
|
-
[GET] >> https://graph.facebook.com/v2.11/6083248100
|
48
|
-
[GET] << {"first_name"=>"Foo", "last_name"=>"Bar"}
|
49
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
50
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
51
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
52
|
-
[POST] << {"success"=>true}
|
53
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
54
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
55
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
56
|
-
[DELETE] << {"success"=>true}
|
57
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 6331ca30-bd85-4ed5-8c5b-34d754cbe52d) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
58
|
-
ETHON: Libcurl initialized
|
59
|
-
[GET] >> https://graph.facebook.com/v2.11/4127242400
|
60
|
-
[GET] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
61
|
-
[GET] >> https://graph.facebook.com/v2.11/9467813000
|
62
|
-
[GET] << {"first_name"=>"Foo", "last_name"=>"Bar"}
|
63
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 84904cdf-4e70-49f1-b453-0575f8045b8b) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
64
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
65
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
66
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
67
|
-
[POST] << {"result"=>"Successfully added Get Started button"}
|
68
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
69
|
-
[DELETE] << {"result"=>"Successfully deleted Get Started button"}
|
70
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
71
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
72
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
73
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
74
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
75
|
-
[DELETE] << {"success"=>true}
|
76
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
77
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
78
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
79
|
-
[POST] << {"success"=>true}
|
80
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 0f2b73f2-ad6f-4987-8124-551b6e754a45) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
81
|
-
ETHON: Libcurl initialized
|
82
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
83
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
84
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
85
|
-
[DELETE] << {"success"=>true}
|
86
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
87
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
88
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
89
|
-
[POST] << {"success"=>true}
|
90
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
91
|
-
[DELETE] << {"result"=>"Successfully deleted Get Started button"}
|
92
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
93
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
94
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
95
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
96
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
97
|
-
[POST] << {"result"=>"Successfully added Get Started button"}
|
98
|
-
[GET] >> https://graph.facebook.com/v2.11/9389461400
|
99
|
-
[GET] << {"first_name"=>"Foo", "last_name"=>"Bar"}
|
100
|
-
[GET] >> https://graph.facebook.com/v2.11/7482355400
|
101
|
-
[GET] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
102
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 8d717947-ae22-41aa-b1f3-68ba4bc5bf1b) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
103
|
-
ETHON: Libcurl initialized
|
104
|
-
[GET] >> https://graph.facebook.com/v2.11/2516608100
|
105
|
-
[GET] << {"first_name"=>"Foo", "last_name"=>"Bar"}
|
106
|
-
[GET] >> https://graph.facebook.com/v2.11/1123011700
|
107
|
-
[GET] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
108
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
109
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
110
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
111
|
-
[DELETE] << {"success"=>true}
|
112
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
113
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
114
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
115
|
-
[POST] << {"success"=>true}
|
116
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
117
|
-
[DELETE] << {"result"=>"Successfully deleted Get Started button"}
|
118
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
119
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
120
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
121
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
122
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
123
|
-
[POST] << {"result"=>"Successfully added Get Started button"}
|
124
|
-
ETHON: Libcurl initialized
|
125
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
126
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
127
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
128
|
-
[DELETE] << {"success"=>true}
|
129
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
130
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
131
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
132
|
-
[POST] << {"success"=>true}
|
133
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
134
|
-
[POST] << {"result"=>"Successfully added Get Started button"}
|
135
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
136
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
137
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
138
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
139
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
140
|
-
[DELETE] << {"result"=>"Successfully deleted Get Started button"}
|
141
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 1d6279b4-102f-46f5-b836-eaa62a721e57) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
142
|
-
[GET] >> https://graph.facebook.com/v2.11/5957069600
|
143
|
-
[GET] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
144
|
-
[GET] >> https://graph.facebook.com/v2.11/3352036800
|
145
|
-
[GET] << {"first_name"=>"Foo", "last_name"=>"Bar"}
|
146
|
-
ETHON: Libcurl initialized
|
147
|
-
[GET] >> https://graph.facebook.com/v2.11/8712021200
|
148
|
-
[GET] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
149
|
-
[GET] >> https://graph.facebook.com/v2.11/9630806100
|
150
|
-
[GET] << {"first_name"=>"Foo", "last_name"=>"Bar"}
|
151
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
152
|
-
[DELETE] << {"result"=>"Successfully deleted Get Started button"}
|
153
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
154
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
155
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
156
|
-
[POST] << {"result"=>"Successfully added Get Started button"}
|
157
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
158
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
159
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 1fab15b0-8dd7-48a9-84c7-fc821d90eed3) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
160
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
161
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
162
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
163
|
-
[POST] << {"success"=>true}
|
164
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
165
|
-
[DELETE] << {"success"=>true}
|
166
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
167
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
168
|
-
[ActiveJob] Enqueued Bobot::CommanderJob (Job ID: 66c81489-6728-4eb6-bdb2-0a601a6890c7) to Test(default) with arguments: {"sender"=>{"id"=>"2"}, "recipient"=>{"id"=>"3"}, "timestamp"=>1457764197627, "message"=>{"mid"=>"mid.1457764197618:41d102a3e1ae206a38", "seq"=>73, "text"=>"Hello, bot!"}}
|
169
|
-
ETHON: Libcurl initialized
|
170
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
171
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
172
|
-
[DELETE] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
173
|
-
[DELETE] << {"success"=>true}
|
174
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
175
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
176
|
-
[POST] >> https://graph.facebook.com/v2.11/page-id/subscribed_apps
|
177
|
-
[POST] << {"success"=>true}
|
178
|
-
[GET] >> https://graph.facebook.com/v2.11/9205496700
|
179
|
-
[GET] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
180
|
-
[GET] >> https://graph.facebook.com/v2.11/7701273000
|
181
|
-
[GET] << {"first_name"=>"Foo", "last_name"=>"Bar"}
|
182
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
183
|
-
[POST] << {"result"=>"Successfully added Get Started button"}
|
184
|
-
[POST] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
185
|
-
[POST] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
186
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
187
|
-
[DELETE] << {"error"=>{"message"=>"Invalid OAuth access token.", "type"=>"OAuthException", "code"=>190, "fbtrace_id"=>"Hlssg2aiVlN"}}
|
188
|
-
[DELETE] >> https://graph.facebook.com/v2.11/me/messenger_profile
|
189
|
-
[DELETE] << {"result"=>"Successfully deleted Get Started button"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# message received or quick replies
|
2
|
-
Bobot::Commander.on :message do |message|
|
3
|
-
end
|
4
|
-
|
5
|
-
# get started and click on any buttons
|
6
|
-
Bobot::Commander.on :postback do |postback|
|
7
|
-
end
|
8
|
-
|
9
|
-
# referral by m.me/XXX?ref=
|
10
|
-
Bobot::Commander.on :referral do |referral|
|
11
|
-
end
|
12
|
-
|
13
|
-
# referral by param ref into send to messenger plugin
|
14
|
-
Bobot::Commander.on :optin do |optin|
|
15
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
bobot_config_path = Rails.root.join("config", "secrets.yml")
|
2
|
-
bobot_config = YAML.safe_load(ERB.new(File.read(bobot_config_path)).result, [], [], true)[Rails.env]["bobot"]
|
3
|
-
|
4
|
-
if bobot_config.present?
|
5
|
-
unless bobot_config.key?("pages")
|
6
|
-
raise "Bobot: #{bobot_config_path} required an array key :pages (cf. https://github.com/navidemad/bobot)"
|
7
|
-
end
|
8
|
-
Bobot.configure do |config|
|
9
|
-
config.app_id = bobot_config["app_id"]
|
10
|
-
config.app_secret = bobot_config["app_secret"]
|
11
|
-
config.verify_token = bobot_config["verify_token"]
|
12
|
-
config.domains = bobot_config["domains"]
|
13
|
-
config.async = bobot_config["async"]
|
14
|
-
config.commander_queue_name = bobot_config["commander_queue_name"]
|
15
|
-
bobot_config["pages"].each do |page|
|
16
|
-
config.pages << Bobot::Page.new(
|
17
|
-
slug: page["slug"],
|
18
|
-
language: page["language"],
|
19
|
-
page_id: page["page_id"],
|
20
|
-
page_access_token: page["page_access_token"],
|
21
|
-
get_started_payload: page["get_started_payload"],
|
22
|
-
)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
else
|
26
|
-
warn "#{bobot_config_path} not configured yet in #{Rails.env} environment."
|
27
|
-
end
|
28
|
-
|
29
|
-
unless Rails.env.production?
|
30
|
-
bot_files = Dir[Rails.root.join("app", "bobot", "**", "*.rb")]
|
31
|
-
bot_reloader = ActiveSupport::FileUpdateChecker.new(bot_files) do
|
32
|
-
bot_files.each { |file| require_dependency file }
|
33
|
-
end
|
34
|
-
|
35
|
-
ActiveSupport::Reloader.to_prepare do
|
36
|
-
bot_reloader.execute_if_updated
|
37
|
-
end
|
38
|
-
|
39
|
-
bot_files.each { |file| require_dependency file }
|
40
|
-
end
|
41
|
-
|
42
|
-
if defined?(Rails::Server)
|
43
|
-
Rails.application.config.after_initialize do
|
44
|
-
Rails.application.config.paths.add File.join("app", "bobot"), glob: File.join("**", "*.rb")
|
45
|
-
Rails.application.config.autoload_paths += Dir[Rails.root.join("app", "bobot", "*")]
|
46
|
-
end
|
47
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
bobot:
|
3
|
-
facebook_1:
|
4
|
-
config:
|
5
|
-
facebook_locales:
|
6
|
-
- "en_US"
|
7
|
-
- "en_UD"
|
8
|
-
- "en_GB"
|
9
|
-
greeting_text: "Bobot is an intelligent robot."
|
10
|
-
persistent_menu:
|
11
|
-
composer_input_disabled: false
|
12
|
-
call_to_actions:
|
13
|
-
- type: "nested"
|
14
|
-
title: "My Account"
|
15
|
-
call_to_actions:
|
16
|
-
- type: "postback"
|
17
|
-
title: "What is a chatbot?"
|
18
|
-
payload: "WHAT_IS_A_CHATBOT"
|
19
|
-
- type: "postback"
|
20
|
-
title: "History"
|
21
|
-
payload: "HISTORY_PAYLOAD"
|
22
|
-
- type: "postback"
|
23
|
-
title: "Contact Info"
|
24
|
-
payload: "CONTACT_INFO_PAYLOAD"
|
25
|
-
- type: "web_url"
|
26
|
-
title: "Get some help"
|
27
|
-
url: "https://github.com/navidemad/bobot"
|
28
|
-
webview_height_ratio: "full"
|
29
|
-
what_is_a_chatbot: "A chatbot is a computer program which conducts a conversation via auditory or textual methods."
|
@@ -1,28 +0,0 @@
|
|
1
|
-
fr:
|
2
|
-
bobot:
|
3
|
-
facebook_1:
|
4
|
-
config:
|
5
|
-
facebook_locales:
|
6
|
-
- "fr_FR"
|
7
|
-
- "fr_CA"
|
8
|
-
greeting_text: 'Bobot est un robot intelligent.'
|
9
|
-
persistent_menu:
|
10
|
-
composer_input_disabled: false
|
11
|
-
call_to_actions:
|
12
|
-
- type: "nested"
|
13
|
-
title: "Mon compte"
|
14
|
-
call_to_actions:
|
15
|
-
- type: "postback"
|
16
|
-
title: "C'est quoi un chatbot ?"
|
17
|
-
payload: "WHAT_IS_A_CHATBOT"
|
18
|
-
- type: "postback"
|
19
|
-
title: "Historique"
|
20
|
-
payload: "HISTORY_PAYLOAD"
|
21
|
-
- type: "postback"
|
22
|
-
title: "Contact Info"
|
23
|
-
payload: "CONTACT_INFO_PAYLOAD"
|
24
|
-
- type: "web_url"
|
25
|
-
title: "Obtenir de l'aide"
|
26
|
-
url: "https://github.com/navidemad/bobot"
|
27
|
-
webview_height_ratio: "full"
|
28
|
-
what_is_a_chatbot: "Un chatbot est un programme qui tente de converser avec une personne durant quelques minutes ou plus en lui donnant l'impression de converser elle-même avec une personne."
|