For install Tutorial HERE
#Ganti token dan chanel screet mu! di file app.py
# Channel Access Token
line_bot_api = LineBotApi('YOUR CHANNEL ACCESS TOKEN')
# Channel Secret
handler = WebhookHandler('YOUR CHANEL SCREET')
line id : arsy22bai
- USE Heroku CLI、Git
- or you can install in ubuntu
heroku login
- Make app in heroku
heroku apps:create appnname
- Make sure you in directory
cd appname
- Set git remote in heroku
heroku git:remote -a HEROKU_APP_NAME
nb : HEROKU_APP_NAME adalah nama app kalian diheroku
- add it
git add .
- then commit
git commit -m "arsybai"
nb. "arsybai" bisa diubah sesuai selera kalian
- Push it to heroku
git push heroku master
message = TextSendMessage(text='Hello, world')
line_bot_api.reply_message(event.reply_token, message)
message = ImageSendMessage(
original_content_url='https://example.com/original.jpg',
preview_image_url='https://example.com/preview.jpg'
)
line_bot_api.reply_message(event.reply_token, message)
message = VideoSendMessage(
original_content_url='https://example.com/original.mp4',
preview_image_url='https://example.com/preview.jpg'
)
line_bot_api.reply_message(event.reply_token, message)
message = AudioSendMessage(
original_content_url='https://example.com/original.m4a',
duration=240000
)
line_bot_api.reply_message(event.reply_token, message)
message = LocationSendMessage(
title='my location',
address='Tokyo',
latitude=35.65910807942215,
longitude=139.70372892916203
)
line_bot_api.reply_message(event.reply_token, message)
message = StickerSendMessage(
package_id='1',
sticker_id='1'
)
line_bot_api.reply_message(event.reply_token, message)
message = ImagemapSendMessage(
base_url='https://example.com/base',
alt_text='this is an imagemap',
base_size=BaseSize(height=1040, width=1040),
actions=[
URIImagemapAction(
link_uri='https://example.com/',
area=ImagemapArea(
x=0, y=0, width=520, height=1040
)
),
MessageImagemapAction(
text='hello',
area=ImagemapArea(
x=520, y=0, width=520, height=1040
)
)
]
)
line_bot_api.reply_message(event.reply_token, message)
message = TemplateSendMessage(
alt_text='Buttons template',
template=ButtonsTemplate(
thumbnail_image_url='https://example.com/image.jpg',
title='Menu',
text='Please select',
actions=[
PostbackTemplateAction(
label='postback',
text='postback text',
data='action=buy&itemid=1'
),
MessageTemplateAction(
label='message',
text='message text'
),
URITemplateAction(
label='uri',
uri='http://example.com/'
)
]
)
)
line_bot_api.reply_message(event.reply_token, message)
message = TemplateSendMessage(
alt_text='Confirm template',
template=ConfirmTemplate(
text='Are you sure?',
actions=[
PostbackTemplateAction(
label='postback',
text='postback text',
data='action=buy&itemid=1'
),
MessageTemplateAction(
label='message',
text='message text'
)
]
)
)
line_bot_api.reply_message(event.reply_token, message)
message = TemplateSendMessage(
alt_text='Carousel template',
template=CarouselTemplate(
columns=[
CarouselColumn(
thumbnail_image_url='https://example.com/item1.jpg',
title='this is menu1',
text='description1',
actions=[
PostbackTemplateAction(
label='postback1',
text='postback text1',
data='action=buy&itemid=1'
),
MessageTemplateAction(
label='message1',
text='message text1'
),
URITemplateAction(
label='uri1',
uri='http://example.com/1'
)
]
),
CarouselColumn(
thumbnail_image_url='https://example.com/item2.jpg',
title='this is menu2',
text='description2',
actions=[
PostbackTemplateAction(
label='postback2',
text='postback text2',
data='action=buy&itemid=2'
),
MessageTemplateAction(
label='message2',
text='message text2'
),
URITemplateAction(
label='uri2',
uri='http://example.com/2'
)
]
)
]
)
)
line_bot_api.reply_message(event.reply_token, message)
message = TemplateSendMessage(
alt_text='ImageCarousel template',
template=ImageCarouselTemplate(
columns=[
ImageCarouselColumn(
image_url='https://example.com/item1.jpg',
action=PostbackTemplateAction(
label='postback1',
text='postback text1',
data='action=buy&itemid=1'
)
),
ImageCarouselColumn(
image_url='https://example.com/item2.jpg',
action=PostbackTemplateAction(
label='postback2',
text='postback text2',
data='action=buy&itemid=2'
)
)
]
)
)
line_bot_api.reply_message(event.reply_token, message)
- Allah swt
- Mom and dad
- stack overflow
- all my friends