通过电报机器人获取 link 共享或点击的数量

Get number of a link Shared or Clicked via telegram bot

我正在使用 node-telegram-bot-api 模块,我想获得我的用户分享给他们朋友的 link 号码。

用户有 Share Status Button
有没有办法显示 Share Status Button 中用户好友的 link SharedClicked 的号码?

例如
1: John's Share Status Button : 5 // John 分享给 5 人或 5 人的 John's Friends Clicked on that link
2: Maria's Share Status Button : 20 // Maria Shared to 20 person or 20 person of Maria's Friends Clicked on that link
.
. 可能吗?

更新:

bot.onText(/\/start/, (msg) => {
  const opts = {
    reply_markup: JSON.stringify({
      keyboard: StartKeyboard,
      resize_keyboard: true,
      one_time_keyboard: true
    })
  };
  bot.sendMessage(msg.chat.id, `telegram.me/fullmovie_bot?start=${msg.chat.id}`, opts);
  console.log (msg)
});

没有直接的,但是你可以间接得到一些指标。

  1. 发起的分享数 (1) - 使用 inline button 回调返回 URL。返回时 URL 更新计数器。
  2. 发起+发送的分享数(2) - 使用switch_inline_query+InlineQuery + answerInlineQuery + chosen_inline_result记录尝试分享和完成的分享。内联查询的形式可以是 @yourbot invite?id=1234。此方法可为您的渠道提供更多指标,但对用户来说不太方便
  3. 看看邀请被查看了多少次 - 使用私人频道并在此处创建消息,转发与用户聊天并要求转发为邀请。该消息将有视图计数器。
  4. 要跟踪共享 clicked/used 使用回调按钮或 URL 跟踪点击的服务器代码或 deeplinks 并检查 /start 参数。它可以是 /start invite?id=123
  5. 的形式

以上方法在我的机器人中成功使用@DebtsTrackerBot