Rev 911 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php#指派命名空間namespace qbpwcf;#匯入外部套件include("../allInOneForSOAP.php");/*#提示當前執行的函數echo "<hr>line:p2tl - testCase 1<br>";#涵式說明:#post message to line timeline#回傳的結果:#$result["status"],執行正常與否,"true"代表正常,"false"代表不正常.#$result["error"],錯誤訊息陣列.#$resutl["function"],當前執行的涵式名稱.#$result["content"],表單開始的語法.#必填的參數:#無#可省略的參數:#$conf["url"],字串,要分享的url,預設為當前頁面.#$conf["url"]="";#可省略的參數:#無.#參考資料來源:#https://github.com/kom3/LineTimeline$p2tl=line::p2tl($conf=array());unset($conf);#印出結果var_dump($p2tl);*//*#提示當前執行的函數#echo "<hr>line:lineLogin - testCase 1<br>";#函式說明:#提供Line Login的服務.#回傳的結果:#$result["status"],執行正常與否,"true"代表正常,"false"代表不正常.#$result["error"],錯誤訊息陣列.#$resutl["function"],當前執行的涵式名稱.#$result["content"],語法.#必填參數:#$conf["url"],字串,要分享的url,預設為當前頁面.$conf["url"]="mobile.qbpwcf.org/qbpwcf/testCase/lineT.php";#$conf["channelId"],字串,channelID.$conf["channelId"]="1656712278";#$conf["fileArgu"],字串,變數__FILE__的內容.$conf["fileArgu"]=__FILE__;#可省略參數:#無.#參考資料來源:#https://developers.line.biz/zh-hant/docs/line-login/integrate-line-login/#making-an-authorization-request#備註:#無.$login=line::login($conf);unset($conf);#debugvar_dump($login);*//*#提示當前執行的函數#echo "<hr>line:getToken - testCase 1<br>";#函式說明:#用從Line Login拿到的code來取得id token#回傳的結果:#$result["status"],執行正常與否,"true"代表正常,"false"代表不正常.#$result["error"],錯誤訊息陣列.#$resutl["function"],當前執行的涵式名稱.#$result["content"],語法.#必填參數:#$conf["url"],字串,auth後要轉到的url,亦即當前頁面的網址.$conf["url"]="mobile.qbpwcf.org/qbpwcf/testCase/lineT.php";#$conf["channelId"],字串,channelID.$conf["channelId"]="1656712278";#$conf["secret"],字串channelID對應的secret.$conf["secret"]="bbd06bcac3dd31b21e17a518c0e1e97b";#$conf["code"],字串透過Line Login取得的code$conf["code"]="bjA1fuShrYAb4Zu0EX5P";#$conf["fileArgu"],字串,變數__FILE__的內容.$conf["fileArgu"]=__FILE__;#可省略參數:#無.#參考資料來源:#https://developers.line.biz/zh-hant/docs/line-login/integrate-line-login/#making-an-authorization-request#備註:#建構中.$getToken=line::getToken($conf);unset($conf);#debugvar_dump($getToken);*//*#提示當前執行的函數#echo "<hr>line:getProfile - testCase 1<br>";#函式說明:#取得從Line Login拿到的code.#回傳的結果:#$result["status"],執行正常與否,"true"代表正常,"false"代表不正常.#$result["error"],錯誤訊息陣列.#$resutl["function"],當前執行的涵式名稱.#$result["content"],語法.#必填參數:#$conf["channelId"],字串,channelID.$conf["channelId"]="1656712278";#$conf["token"],字串透過getToken取得的token.$conf["token"]="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FjY2Vzcy5saW5lLm1lIiwic3ViIjoiVTg5NmNhNWIwOWNkMDEzMjVmODhkOTZmZjJmZDA3YzFlIiwiYXVkIjoiMTY1NjcxMjI3OCIsImV4cCI6MTYzOTIxNzQ3NCwiaWF0IjoxNjM5MjEzODc0LCJhbXIiOlsibGluZXNzbyJdLCJuYW1lIjoi6Zmz5pWP5LmLIiwicGljdHVyZSI6Imh0dHBzOi8vcHJvZmlsZS5saW5lLXNjZG4ubmV0LzBoMC1hX2d4dW9id0pjSm5qdmZwZ1FWV0JqWVc4ckNHbEtKRU1nYlhzZ1lqUnhIMzhFWVVSMVlDd2tZV1VpRkNvRFpVZHlOQ3dsTmpWMSJ9.NvB_aXWa47Z3PRauZw_RaNXJ7D5eOZXm8IKThOFWREs";#$conf["fileArgu"],字串,變數__FILE__的內容.$conf["fileArgu"]=__FILE__;#可省略參數:#無.#參考資料來源:#https://developers.line.biz/zh-hant/docs/line-login/integrate-line-login/#making-an-authorization-request#備註:#無.$getProfile=line::getProfile($conf);unset($conf);#debugvar_dump($getProfile);*/?>