pyTelegramBotAPI icon indicating copy to clipboard operation
pyTelegramBotAPI copied to clipboard

Can't send inline photos with url in variable

Open ticoti opened this issue 10 years ago • 1 comments

I am having many problems to send an image whose url is in a variable returned by a function,but if I set a static url like in examples everything is fine

I do something like this

image_url,text=function()

r = types.InlineQueryResultPhoto('1', image_url,thumb_url=image_url,caption=text)

I don't know if may be that the image_url is in unicode,I have tried converting it too but it doesn't work either

If if do the same,but instead of setting image url in queryresult I set the link and thumb like 'http://.....jpg' I have no problem to make it work

ticoti avatar Jan 19 '16 05:01 ticoti

No I got it setting a fixed thumb and variable image_url( and it show as thumb the image_url)

but actually only shows the image after sending inlinequeryresultarticle with same image link and if I have with an image the inlinequeryresultarticle is not appearing in mobile versions :/

ticoti avatar Jan 19 '16 05:01 ticoti