Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Problem with InlineKeyboardMarkup #47

Open
Quarx2k opened this issue Mar 9, 2018 · 1 comment
Open

Problem with InlineKeyboardMarkup #47

Quarx2k opened this issue Mar 9, 2018 · 1 comment

Comments

@Quarx2k
Copy link

Quarx2k commented Mar 9, 2018

When i try send message with InlineKeyboardMarkup, this error throwed
org.telegram.telegrambots.exceptions.TelegramApiRequestException: Error sending message: [400] Bad Request: can't parse reply keyboard markup JSON object
It's a bug or i do something wrong?
Thanks.

@Maverick1983
Copy link

Change on Proxy.php this line (from line 43)

foreach ($this->REQUEST as $key => $val) {
$cmd .= '--form-string '.escapeshellarg($key.'='.$val).' ';
$request_headers[] = 'Content-Type: multipart/form-data';
}

with this

$cmd .= '-d '.escapeshellarg(json_encode($this->REQUEST)).' ';
$request_headers[] = 'Content-Type: application/json';

Add this after line 50
$request_headers[] = 'Content-Type: multipart/form-data';

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants