1
1
# Caesar Bot
2
2
3
3
This is a Facebook chat bot template project with minimal functionality.
4
- It translates roman numbers into arabic ones. Oh - and it is talking
4
+ It translates Roman numbers into Arabic ones. Oh - and it is talking
5
5
German only. This repository is meant to be a companion to an article
6
6
published in [ t3n magazin] ( http://t3n.de/magazin/ ) (Nr. 45, 2016) but
7
- you are free to use it anyhow you like.
7
+ you are free to use it you like.
8
8
9
9
[ ![ license] ( https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000?style=flat-square )] ( LICENSE.txt )
10
10
@@ -18,80 +18,80 @@ You should know [git](https://git-scm.com/ "Git Homepage") and
18
18
To create your own version of this bot just:
19
19
20
20
1 . Clone or copy this repository
21
-
21
+
22
22
``` bash
23
23
git clone https://github.com/smartsteuer/caesar-bot.git name-of-your-bot
24
24
```
25
25
26
- 2. Change into the new directory
27
-
26
+ 2. Change to the new directory
27
+
28
28
` ` ` bash
29
29
cd name-of-your-bot
30
30
` ` `
31
31
32
32
3. Install the dependencies
33
-
33
+
34
34
` ` ` bash
35
35
npm install
36
36
` ` `
37
37
38
- 4. Test if everythink worked out .
39
-
38
+ 4. Test if everything works .
39
+
40
40
` ` ` bash
41
41
npm test
42
42
` ` `
43
43
44
44
# # Customize
45
45
46
46
At this point you are free to optimize, extend and change this bot as
47
- you like. What ever you are intending to do in the future, the first
48
- think to do is to change the verify token with which Facebook is going
49
- to check your webhook.
47
+ you like. What ever you are intending to do in the future - the first
48
+ thing to do is to change the verify token Facebook is going to check
49
+ your webhook with .
50
50
51
51
1. Open ` webhook-get.spec.js` and change the
52
52
(token)[app/fb/webhook-get.spec.js#L14] to a freely selectable value.
53
- (your are going to share this value with facebook later on)
53
+ (You are going to share this value with Facebook later on)
54
54
2. Run ` npm test` again
55
55
3. Fix all broken tests
56
56
57
- You' r good to go public!
57
+ You are good to go public!
58
58
59
59
# # Deployment
60
60
61
- Your bot is running locally - good. But we want the world to see it… (We
62
- are going to deploy on heroku but you are free to take any provider you
63
- like)
61
+ Your bot is running locally - good. But we want the world to see it… (In
62
+ this example we are going to deploy on heroku but you are free to choose
63
+ any provider you like)
64
64
65
65
1. Be familiar with
66
66
[Heroku](https://www.heroku.com/home " Heroku homepage" ) and install
67
67
their toolbelt.
68
68
2. Login (if you haven' t done this already)
69
-
69
+
70
70
```bash
71
71
heroku login
72
72
```
73
73
74
74
3. Create a new Heroku app
75
-
75
+
76
76
```bash
77
77
heroku create
78
78
```
79
79
80
80
4. Deploy (a.k.a. push to the heroku git) the app.
81
-
81
+
82
82
```bash
83
83
git push heroku master
84
84
```
85
85
86
- More information on node on heroku can be found here:
86
+ More information on Node on Heroku can be found here:
87
87
[getting started](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
88
88
89
89
## Register your app with Facebook
90
90
91
- I won ' t go into detail here. But with your app running on Heroku you now
92
- have a URL which you can feed into the FB registration process for new
93
- messenger apps. It' s general structure is straitforward and looks like
94
- this:
91
+ I will not go into detail here, but with your app running on Heroku you
92
+ now have a URL which you can feed into the FB registration process for
93
+ new messenger apps. It' s general structure is straightforward and looks
94
+ like this:
95
95
96
96
` ` `
97
97
https://name-of-your-bot.herokuapp.com/fb
@@ -101,19 +101,19 @@ This is the webhook Facebook is going to communicate with.
101
101
102
102
# # Configuration
103
103
104
- For your app to work you need to set the access token which was
104
+ For your app to work you need to set the access token which has been
105
105
generated by Facebook during the registration process.
106
106
107
107
1. Open the Heroku dashboard https://dashboard.heroku.com/apps
108
108
2. Find and open your app
109
109
3. Change to ` Settings`
110
- 4. Reveal your config vars
110
+ 4. ' Reveal' your config vars
111
111
5. Add a new var with the key set to ` FB_ACCESS_TOKEN` and the value to
112
112
the token you got from Facebook.
113
113
114
114
# Feedback
115
115
116
- If you have anythink in mind concerning this repro or the article, let
116
+ If you have anything in mind concerning this repo or the article, let
117
117
us know! Use the issue tracker or contact us on twitter. Björn
118
118
[@waide](https://twitter.com/waide), Eike
119
119
[@stagzta](https://twitter.com/stagzta)
0 commit comments