This is my sample code where I get the message from the user. It's text only, so how can I get if I receive an image from the user? I'm using PHP from my bot.
$message = $input['entry'][0]['messaging'][0]['message']['text'];
This is my sample code where I get the message from the user. It's text only, so how can I get if I receive an image from the user? I'm using PHP from my bot.
$message = $input['entry'][0]['messaging'][0]['message']['text'];
get the value of attach file using php:
$message = $input['entry'][0]['messaging'][0]['message']['attachments'];
to post the result => $message[0]['payload']['url'].
You will have the image url at:
entry[0].messaging[0].message.attachments[0].payload.url
To check if you have recieved a text or an image :
if(entry[0].messaging[i].message.text)
//text
else
// image