從推特取得網址後經由Line的Notify通知圖片與推文的一個小工具 也可視作為通知廣播機器人
本教學以比村老師arrow-up-right作範例
以下以中文環境作為教學
首先請先準備以下工具
IFTTTarrow-up-right 帳號 (可以經由Google帳號申請)
Herokuarrow-up-right 帳號
LineNotifyarrow-up-right 帳號 (line帳號登入即可)
Twitterarrow-up-right 帳號
1. 登入 LineNotify 申請一個權杖(token) 先將 Notify(機器人) 設定好群組與名稱 取得token後請複製起來
2. 按下 arrow-up-right"此處"arrow-up-right 將專案匯入 並且將剛剛申請好的Token填入選項中 Heroku專案匯入完成後 點選右上角的 openapp 複製該網址
3. IFTTT 選擇頭像後 選擇 Create 後 IF 選擇 Twitter -> New tweet from search 這裡輸入你想追蹤的推主/對象 (可使用進階搜尋arrow-up-right方式指定追蹤)
範例 : 包含此處字詞 : 月曜日のたわわ その 「 」 , 來自這些帳號 : @Strangestone 確定後 搜尋串會獲得 月曜日のたわわ その 「 」 from:Strangestone 將此串貼在 IFTTT
月曜日のたわわ その 「 」
@Strangestone
月曜日のたわわ その 「 」 from:Strangestone
4. IFTTT than 選擇 WebHooks 後 除了url需要自己從heroku取得外 Body請直接複製貼上進去
URL 貼上 步驟2取得的 herokuAPPurl
herokuAPPurl
Method 選擇 post
post
Content Type 選擇 application/json
application/json
Body 填入 {"text": {{Text}} , "LinkToTweet": {{LinkToTweet}} }
{"text": {{Text}} , "LinkToTweet": {{LinkToTweet}} }
5. 回到 Line 將 LineNotify 邀請進入當初設定的群組 Enjoy!
Last updated 6 years ago