afifmakarim

Untitled

Jul 21st, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $response = $bot->getProfile($event['source']['userId']);
  2. if ($response->isSucceeded()) {
  3. $profile = $response->getJSONDecodedBody();
  4. }
  5.  
  6. if($userMessage == "halo"){
  7. $textMessageBuilder = new \LINE\LINEBot\MessageBuilder\TextMessageBuilder("halo" . $profile['displayName'] . ", salam kenal");
  8. $result = $bot->replyMessage($event['replyToken'], $textMessageBuilder);
  9. return $result->getHTTPStatus() . ' ' . $result->getRawBody();
  10. }
Advertisement
Add Comment
Please, Sign In to add comment