Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

サンプルが動作しませんね #13

Closed
shinriyo opened this issue Oct 2, 2016 · 1 comment
Closed

サンプルが動作しませんね #13

shinriyo opened this issue Oct 2, 2016 · 1 comment

Comments

@shinriyo
Copy link

shinriyo commented Oct 2, 2016

https://github.com/line/line-bot-sdk-go/blob/master/examples/echo_bot/server.go
これをmain.goにして、
godepも行い、HEROKUにpushいたしました。

os.Getenv("CHANNEL_SECRET"),
os.Getenv("CHANNEL_TOKEN"),

これらのコードの対応のためにBUISINESS CENTERの自分の設定を行った。

 heroku config:set CHANNEL_SECRET=xxxx
 heroku config:set CHANNEL_TOKEN=xxxx

LINEの管理画面ではWebhook URLには、
https://アカウント.herokuapp.com:443/callbackを設定済み。
heroku logs --tailは問題なし。

@shinriyo
Copy link
Author

shinriyo commented Oct 2, 2016

せっかくなので解決方法。
というより私が間違えていたことを書いておきます。

その1

CHANNEL_SECRET=
CHANNEL_TOKEN=

CHANNEL_SECRETには、管理画面の「Channel Secret」を、
CHANNEL_TOKENには、管理画面の「Channel Access Token」を入れる。

Channel IDはいらない。Channel IDはいらない。

その2

herokuのURLL:443/callback
herokuのURLL:443/callback/

「:443」は今回必須ではない。

Herokuにdevelopをpushsしてしまってた。
git push heroku developしてしまったら、いったんローカルのmasterにdevelopからマージしておく。

その3 LINE側の設定

http://milk0824.hatenadiary.jp/entry/2016/10/01/211555
「次の設定がややこしいです。」を設定。

@moznion moznion closed this as completed Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants