@@ 72-89 (lines=18) @@ | ||
69 | } |
|
70 | ||
71 | ||
72 | public function sendImageMessage($recipientId, $picture) |
|
73 | { |
|
74 | ||
75 | $messageData = [ |
|
76 | 'recipient' => ['id' => $recipientId], |
|
77 | 'message' => [ |
|
78 | 'attachment' => [ |
|
79 | 'type' => 'image', |
|
80 | 'payload' => |
|
81 | [ |
|
82 | 'url' => $picture |
|
83 | ] |
|
84 | ] |
|
85 | ] |
|
86 | ]; |
|
87 | ||
88 | return $this->callSendAPI($messageData); |
|
89 | } |
|
90 | ||
91 | public function sendCard($recipientId, $card) |
|
92 | { |
|
@@ 91-105 (lines=15) @@ | ||
88 | return $this->callSendAPI($messageData); |
|
89 | } |
|
90 | ||
91 | public function sendCard($recipientId, $card) |
|
92 | { |
|
93 | ||
94 | $messageData = [ |
|
95 | 'recipient' => ['id' => $recipientId], |
|
96 | 'message' => [ |
|
97 | 'attachment' => [ |
|
98 | 'type' => 'template', |
|
99 | 'payload' => $card |
|
100 | ] |
|
101 | ] |
|
102 | ]; |
|
103 | ||
104 | return $this->callSendAPI($messageData); |
|
105 | } |
|
106 | ||
107 | ||
108 | public function callSendAPI($messageData) |