File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 87
87
$ content = array ('chat_id ' => $ chat_id , 'latitude ' => "37.5 " , 'longitude ' => "15.1 " );
88
88
$ telegram ->sendLocation ($ content );
89
89
}
90
+
91
+ elseif ($ text == "/inlinekeyboard " ) {
92
+ // Shows the Inline Keyboard and Trigger a callback on a button press
93
+ $ option = array (
94
+ array (
95
+ $ telegram ->buildInlineKeyBoardButton ("Callback 1 " , $ url ="" , $ callback_data ="1 " ),
96
+ $ telegram ->buildInlineKeyBoardButton ("Callback 2 " , $ url ="" , $ callback_data ="2 " )
97
+ )
98
+ );
99
+
100
+ $ keyb = $ telegram ->buildInlineKeyBoard ($ option );
101
+ $ content = array ('chat_id ' => $ chat_id , 'reply_markup ' => $ keyb , 'text ' => "This is an InlineKeyboard Test with Callbacks " );
102
+ $ telegram ->sendMessage ($ content );
103
+ }
90
104
}
91
105
92
106
?>
You can’t perform that action at this time.
0 commit comments