Laravel检查与其他用户的用户共享电报Bot链接 [英] Laravel Check the User Share Telegram Bot Link to other Users

查看:106
本文介绍了Laravel检查与其他用户的用户共享电报Bot链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发这个机器人,但是首先我要求用户将我的机器人的链接共享给其他5个用户,然后继续并在我的机器人中注册,我开发了所有部分,但是我无法处理第一个部分,我该怎么办?检测到使用发送共享链接到其他用户? 我使用laravel + talageram机器人SDK开发我的机器人.

Hi i want to develop the bot , but first i ask users to share the link of my bot to 5 other users then continue and register in my bot , i develop all sections but i cannot handle the first one, how can i detect that the use send share link to other user ? i user laravel + talageram bot SDK to develop my bot.

我只想知道用户共享链接并继续,我在许多文档和网站芽中搜索我找不到对我有用的任何东西. 请帮助我用电报机器人解决这个问题.谢谢:)

i just want to know that user share the link and continue , i search in many docs and site bud i cannot find anythings that useful to me. please help me to handle this problem in my telegram bot . thanks :)

推荐答案

基本上,您无法确定您的用户是否已将链接发送给其他人.您只能找出其他用户何时点击链接并启动您的漫游器.这可以通过深层链接来完成.您应该为每个用户创建一个唯一的标识符,并将其作为查询字符串添加到为该用户创建的特殊链接中.

Basically, you can't find out if your user has sent the link to others. You can only find out when the other user taps on the link and starts your bot. This can be done by Deep Linking. You should create a unique identifier for each user and add it as a query string to the special link made for the user.

示例:

https://telegram.me/my_bot?invitedFrom=user1

每次用户启动您的漫游器时,您都必须检查invitedFrom参数,以便将推介用户归功.

You have to check for invitedFrom parameter each time a user starts your bot in order to credit the referrer user.

使用上述方法,只有当其他用户启动您的漫游器时,您才会收到通知.

By using above method, you will only be notified when the other user starts your bot.

但是,您可以采取一些技巧,以查看是否有特殊消息转发给其他用户.步骤如下:

However there is a trick you can do in order to see if a special message is forwarded to other users. Here are the steps:

  1. 设置私人频道.
  2. 创建一条包含您的漫游器链接的消息.
  3. 将消息转发给您的机器人用户.
  4. 请您的漫游器用户将消息转发给朋友.
  5. 检查邮件的观看次数,以了解是否被其他人看到.

通过此技巧,您可以发现包含您的漫游器链接的消息被查看了多少次.

By using this trick you can find out how many times the message containing your bot link is seen.

这篇关于Laravel检查与其他用户的用户共享电报Bot链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆