-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"image" text not responding with image attachment #27
Comments
I have the same error.
Error codes - Messenger Platform |
@ekundayo-ab Any error messages? |
@wittfabian I got a 200 OK Response, but an undefined in response served.
|
@andreshg112 what tool do you use, to see server response? |
@ekundayo-ab is the index file the original one from this repo? |
Yes.
…On Apr 10, 2017 10:58 AM, "Fabian" ***@***.***> wrote:
@ekundayo-ab <https://github.com/ekundayo-ab> is the index file the
original one from this repo?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATboGa_mk99NGD8nxtYluwcpN0jeR74tks5ruf1MgaJpZM4M4RS->
.
|
@wittfabian here:
|
@andreshg112 "error codes" are not the best part of the facebook docs |
@wittfabian the sample url seems to be the problem. |
@wittfabian @andreshg112 I tested with another image link and it worked.
I'll recommend the sample url changed or encoded. |
@ekundayo-ab, I use ngrok, and I add return before sending the message:
|
@ekundayo-ab, It's working using the image link you posted above. |
I think the problem is $command never gets set to "Image" so it never tries to send image back. `$command = "";
|
if you send "image" via the facebook messenger, the first part of the if statement is triggered |
I am wrong then, sorry I have not tried sending image yet so I just guessed maybe that is the issue |
@wittfabian I think you are wrong actually, I agree that it will go to first IF block but for images there won't be any "text" field inside message object. I just sent an image to my bot and the response is as following:
So I updated command setting code to the following and it correctly sets command to be image as I tested but stilldoes not send image back. If I send text back instead of image inside "case 'image':" block then it does send the text but not image.
|
No, the idea is to send the text "image" as command. |
It does not do it, in your code command would never be set to image IMO. Because there is no "text" field in "message" object of the response when you send image EDIT: ohh you mean sending "image" as text message to bot |
Why not? |
I get it now, I did not understand it properly before. I thought you would nee to send real image (not "image" text) to bot in order to receive image from bot. |
The initial problem is solved, use the following image: |
Closed. The example will be updated! |
After typing "image" in the chat box, Bot does not respond.
The text was updated successfully, but these errors were encountered: