def sendLiff(to, data): xyz = LiffChatContext(to) xyzz = LiffContext(chat=xyz) view = LiffViewRequest('1602687308-GXq4Vvk9', xyzz) token = client.liff.issueLiffView(view) url = 'https://api.line.me/message/v3/share' headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % token.accessToken } data = {"messages": [data]} requests.post(url, headers=headers, data=json.dumps(data))
def sendTemplate(to, data): xyz = LiffChatContext(to) xyzz = LiffContext(chat=xyz) view = LiffViewRequest('1643727178-0XPGAaRX', xyzz) token = cannibal.liff.issueLiffView(view) url = 'https://api.line.me/message/v3/share' headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % token.accessToken } data = {"messages": [data]} requests.post(url, headers=headers, data=json.dumps(data))
def sendTemplate(group, data): xyz = LiffChatContext(group) xyzz = LiffContext(chat=xyz) view = LiffViewRequest('1653391722-QN5aXrrz', xyzz) token = devi.liff.issueLiffView(view) url = 'https://api.line.me/message/v3/share' headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % token.accessToken } data = {"messages": [data]} requests.post(url, headers=headers, data=json.dumps(data))
def sendflex(to, data): n1 = LiffChatContext(msg.to) n2 = LiffContext(chat=n1) view = LiffViewRequest('1602687308-GXq4Vvk9', n2) token = shi.issueLiffView(view) url = 'https://api.line.me/message/v3/share' headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % token.accessToken } data = {"messages": [data]} requests.post(url, headers=headers, data=json.dumps(data))