-
Notifications
You must be signed in to change notification settings - Fork 147
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
VideoMessage #169
Comments
@Yggdrasills to get a link to a video file from youtube, I use this api https://api.unblockvideos.com/youtube_downloader?id=_PBlykN4KIY&selector=mp4 |
I tried to use this link, but it doesn't work https://www.facebook.com/100035197906425/videos/116234242893172/.mp4 |
https://www.facebook.com/100035197906425/videos/116234242893172/.mp4 |
Should this work? I tried it, but it did not work |
this should not work, this is an api for getting a link to a file by ID video from YouTube |
Thanks, it helped. However, when the video is sent, the bot starts spamming without stopping $bot->send(new VideoMessage($message['sender']['id'], "correct link")); How to fix it? After removing the video sending line, the bot still continues spamming until I restart the server |
What do you mean with "starts spamming"? Please provide examples! |
You're probably responding to the ECHO message (which is then creating a loop). Gotta filter that out! |
https://prntscr.com/nawlhu |
Did not help. Can I somehow send the video from my account by id? |
Replies to one message about 10 times. If I send something else when sending a video, then it is sent multiple times. What if the script scrolls many times? die () and exit () don't help. The server itself sends many requests to the script. Sending pictures via ImageMessage everything works as it should, but not with VideoMessage ... |
understood. This is because Facebook is waiting for a response and if there is no response within a few seconds then it sends the request again. The send (Video) function takes a few seconds to process. I solved this problem this way. On any webhook message I immediately respond response 200 ok and put the processing in the queue |
I'm sorry, it is my first issue on GitHub. I can't send video to the chat from my profile or youtube. Can you help me?
Here is my code:
$bot->send(new VideoMessage($message['sender']['id'], "https://youtu.be/_PBlykN4KIY"));
But it works with photos
$bot->send(new ImageMessage($message['sender']['id'], "imagepath"));
The text was updated successfully, but these errors were encountered: