Share My Creation [B4J] Line Notify

Discussion in 'B4J Share Your Creations' started by jinyistudio, Mar 25, 2018.

  1. jinyistudio

    jinyistudio Active Member Licensed User

    Let you send message from Web Application to Your "LINE ID"
    https://notify-bot.line.me/doc/en/

    Code:
    'Non-UI application (console / server application)
    #Region Project Attributes
        
    #CommandLineArgs:
        
    #MergeLibraries: True
        
    #LibraryVersion:1.2
        
    #LibraryAuthor:jinyistudio
    #End Region

    Sub Process_Globals
        
    Dim leNotify As jyLineNotify
    End Sub

    Sub AppStart (Args() As String)
        
    ' 輸入與各別LINE ID連動的權仗ID
        leNotify.Initialize(Me,"5wKtXUxkNF69hMhd5B1wluYBKbVuE6uhqZynjwHFon0")
        
    ' msg 要發送至LINE的message, NotifyID為Done事件識別碼
        leNotify.LineNotify("20180204","123")
        
    ' msg 要發送至LINE的message, imgDir為圖檔目錄, imgName為圖檔名稱,
        ' NotifyID為Done事件識別碼
        leNotify.lineNotify3("1","d:\temp","dimmer.png","3"' 李&紀
        StartMessageLoop
    End Sub

    Sub LineNotifyDone(Id As String, Respond As Map)
        
    Dim ss As String=Respond.Get("status")
        
    Dim sm As String=Respond.Get("message")
        
    Log($"Notify:${Id}, Status:${ss}, Message:${sm}"$)
    End Sub

    'Return true to allow the default exceptions handler to handle the uncaught exception.
    Sub Application_Error (Error As Exception, StackTrace As StringAs Boolean
        
    Return True
    End Sub
    lineNotify.png lineNotify.png
     

    Attached Files:

    Last edited: Mar 25, 2018
  2. joulongleu

    joulongleu Member

    Hi jinyistudio:請問如果要程式碼寄給他人 LINE 可以嗎? 感謝
     
  3. jinyistudio

    jinyistudio Active Member Licensed User

    Hi
    message只要是文字都行,你可以試看看,不過碼長了,用這寄不方便吧!
     
    joulongleu likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice