Core: how can i attach a file to a long message?

Created on 28 Feb 2017  ยท  7Comments  ยท  Source: php-telegram-bot/core

how can i attach a file to long message?
like this?
https://i.stack.imgur.com/0u9hc.png

Most helpful comment

Link can be attached with zero width space utf symbol.
Test this message, for example:

$data = [
    'chat_id'    => $chat_id,
    'parse_mode' => 'HTML',
    'text'       => 'So, is there a secret way? <a href="http://telegra.ph/Another-11-30">โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹</a>',
];

image

All 7 comments

@MBoretto @noplanman @jacklul can you suggest anything guys?

Document caption has a limit of 200 characters.

Trying to figure out if that is the document caption in the screenshot or something else...

This might be something they didn't release yet to the API, it looks like linked content but also like attachment. Maybe there is some kind of new field that allows links to be attached?

@jacklul I agree, it's not a document caption. It looks like a preview when sharing a link, maybe they'll be adding that to the Document entity?
@hamidamel Where did you take that screenshot from?

Link can be attached with zero width space utf symbol.
Test this message, for example:

$data = [
    'chat_id'    => $chat_id,
    'parse_mode' => 'HTML',
    'text'       => 'So, is there a secret way? <a href="http://telegra.ph/Another-11-30">โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹</a>',
];

image

@chuv1 Thanks, before you wrote this comment i solved my problem like you do, bu I used your sample for white space trick.thats really useful.
we can set parse_mode to markdown and use like this:

$data = [
    'chat_id'    => $chat_id,
    'parse_mode' => 'markdown',
    'text'       => '['white-spaces'](url)',
];

thank @MBoretto @noplanman @jacklul @akalongman for your comments and specialy thank to you @chuv1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dorcu picture dorcu  ยท  3Comments

marcolino7 picture marcolino7  ยท  3Comments

nesttle picture nesttle  ยท  4Comments

ttvd94 picture ttvd94  ยท  4Comments

mohsenshahab picture mohsenshahab  ยท  4Comments