我正在尝试使用 sendPhoto (Telegram 的 Bot API)发送一个动画 GIF 与此请求:
https://api.telegram.org/bot<token>/sendPhoto?chat_id=<chat_id>&photo=http://i.giphy.com/13IC4LVeP5NGNi.gif
该方法有效,例如,我ok:true
回来了,但聊天窗口中的图像是移动 GIF 的静止快照。
如何让动画 GIF 显示?我应该使用另一种方法吗?
我正在尝试使用 sendPhoto (Telegram 的 Bot API)发送一个动画 GIF 与此请求:
https://api.telegram.org/bot<token>/sendPhoto?chat_id=<chat_id>&photo=http://i.giphy.com/13IC4LVeP5NGNi.gif
该方法有效,例如,我ok:true
回来了,但聊天窗口中的图像是移动 GIF 的静止快照。
如何让动画 GIF 显示?我应该使用另一种方法吗?
您应该使用sendAnimation方法发送没有声音的GIF 或 H.264/MPEG-4 AVC 视频。
只需使用animation
GIF 文件的参数即可。
sendPhoto
仅用于静态图像。
使用 sendVideo 方法!
https://api.telegram.org/bot<token>/sendVideo?chat_id=<chat_id>&video=http://i.giphy.com/13IC4LVeP5NGNi.gif
这会起作用