Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtTelegrambot not receiving message from PHP

QtTelegrambot not receiving message from PHP

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 553 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • GuapoG Offline
    GuapoG Offline
    Guapo
    wrote on last edited by Guapo
    #1

    I´m using this library QtTelegramBot and my Qt app can send/receive messages to/from Official Telegram app and my cel phone bot.

    When I sent a message from php using a code like this:

    <?php

    $bottoken='here is my telegram token';

    $request_params=[
    "chat_id" => "my id telegram",
    "text" => "my message",
    ];

    $request_url="https://api.telegram.org/bot". $bottoken . '/sendMessage?' .http_build_query($request_params);
    file_get_contents($request_url);

    echo "sent";

    ?>

    This code sent message correctly to Official Desktop Telegram client and my cell phone. But my Qt app using QtTelegrambot library not receive anything.

    Any hint?

    Thanks a lot

    K 1 Reply Last reply
    0
    • K koahnig

      @Guapo

      Are you aware that this library is third party and uses only Qt 5?
      I would recommend to contact the author of that library for some advice.

      GuapoG Offline
      GuapoG Offline
      Guapo
      wrote on last edited by
      #3

      @koahnig thanks for your response.

      Yes, i know this library is a third party....but now I understand better. When I use a PHP code to sent messages...the sender is the Bot.
      So my Qt app is the bot and it´s not possible to read it´s own messages, only message receive from others.

      1 Reply Last reply
      1
      • GuapoG Guapo

        I´m using this library QtTelegramBot and my Qt app can send/receive messages to/from Official Telegram app and my cel phone bot.

        When I sent a message from php using a code like this:

        <?php

        $bottoken='here is my telegram token';

        $request_params=[
        "chat_id" => "my id telegram",
        "text" => "my message",
        ];

        $request_url="https://api.telegram.org/bot". $bottoken . '/sendMessage?' .http_build_query($request_params);
        file_get_contents($request_url);

        echo "sent";

        ?>

        This code sent message correctly to Official Desktop Telegram client and my cell phone. But my Qt app using QtTelegrambot library not receive anything.

        Any hint?

        Thanks a lot

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #2

        @Guapo

        Are you aware that this library is third party and uses only Qt 5?
        I would recommend to contact the author of that library for some advice.

        Vote the answer(s) that helped you to solve your issue(s)

        GuapoG 1 Reply Last reply
        3
        • K koahnig

          @Guapo

          Are you aware that this library is third party and uses only Qt 5?
          I would recommend to contact the author of that library for some advice.

          GuapoG Offline
          GuapoG Offline
          Guapo
          wrote on last edited by
          #3

          @koahnig thanks for your response.

          Yes, i know this library is a third party....but now I understand better. When I use a PHP code to sent messages...the sender is the Bot.
          So my Qt app is the bot and it´s not possible to read it´s own messages, only message receive from others.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved