Title: inline Buttons
Last modified: February 27, 2017

---

# inline Buttons

 *  [AmirHossein](https://wordpress.org/support/users/aghorbanmehr/)
 * (@aghorbanmehr)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/inline-buttons/)
 * Could you please tell me how to use inline buttons in this plugin or my custom
   plugin?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [AmirHossein](https://wordpress.org/support/users/aghorbanmehr/)
 * (@aghorbanmehr)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/inline-buttons/#post-8856901)
 * I also tested the way that explained in this link
    [https://www.botpress.org/docs/telegram/reply-markup-keyboard-inline-keyboard/](https://www.botpress.org/docs/telegram/reply-markup-keyboard-inline-keyboard/)
   But it does not work for me! Anyway I need to know how to use it in my custom
   plugin!
 *  Thread Starter [AmirHossein](https://wordpress.org/support/users/aghorbanmehr/)
 * (@aghorbanmehr)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/inline-buttons/#post-8858322)
 * I’ve just changed your code like this!
    function telegram_get_inline_keyboard_layout(
   $template) { //return (array)json_decode( $template ); return [[ [ ‘text’ => ‘
   Some button text 1’, ‘callback_data’ => ‘1’ ], [ ‘text’ => ‘Some button text 
   2’, ‘callback_data’ => ‘2’ ] ]]; }
 * and it worked for me! But when i used “return (array)json_decode( $template );”
   
   with this sample: “[[{“text”:”Text 1″,”callback_data”:”1″},{“text”:”Link 1″,”
   url”:”https://botpress.org”}],[{“text”:”Text2″,”callback_data”:”2″}]]” nothing
   happened!
 *  Thread Starter [AmirHossein](https://wordpress.org/support/users/aghorbanmehr/)
 * (@aghorbanmehr)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/inline-buttons/#post-8873934)
 * I test your sample code with ” instead of “
 * [[{“text”:”text 1″,”callback_data”:”1″},{“text”:”Some button text 2″,”url”:”[https://botpress.org&#8221](https://botpress.org&#8221);},{“
   text”:”Some button text 3″,”callback_data”:”3″}]]
 * and its working now!
    that was because of ” and “ your code is: “[[{“text”:”Text
   1″,”callback_data”:”1″},{“text”:”Link 1″,”url”:”https://botpress.org”}],[{“text”:”
   Text2″,”callback_data”:”2″}]]”
    -  This reply was modified 9 years, 3 months ago by [AmirHossein](https://wordpress.org/support/users/aghorbanmehr/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘inline Buttons’ is closed to new replies.

 * ![](https://ps.w.org/telegram-bot/assets/icon-256x256.png?rev=2981438)
 * [Telegram Bot & Channel](https://wordpress.org/plugins/telegram-bot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/telegram-bot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/telegram-bot/)
 * [Active Topics](https://wordpress.org/support/plugin/telegram-bot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/telegram-bot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/telegram-bot/reviews/)

 * 3 replies
 * 1 participant
 * Last reply from: [AmirHossein](https://wordpress.org/support/users/aghorbanmehr/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/inline-buttons/#post-8873934)
 * Status: not resolved