Laravel Check the User Share Telegram Bot Link to other Users - laravel-5.4

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.
Example:
https://telegram.me/my_bot?invitedFrom=user1
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:
Make a private channel.
Create a message containing your bot link.
Forward the message to your bot user.
Ask your bot user to forward the message to friends.
Check the view count of the message to know if it's seen by others.
By using this trick you can find out how many times the message containing your bot link is seen.

Related

Firebase Chat Application with Social Media on Flutter

I have a social media app written in Flutter. Users can see the profiles each other and block/unblock them. I'm using MySQL to keep that data. Now I want to implement chat feature using Firebase Firestore (or maybe MongoDB). When a user sends a message to another user, should I check if user blocked another user from MySQL every time, so user can't send new message. Is this a good practice in chat application, or should I store the "blocked" data at Firebase also.
I researched this subject deeply but didn't find any solution.
Like when user is trying to send a message to another user so in the list of the recipients you are also retrieving the value for (is particular user is blocked by the current user), if it's so you are checking this on that time.
Secondly, if you want this to check when sending to server. So, you can manage this using firestore transaction in which you might get the object of the sender and check to whom the sender has blocked and you may throw an exception. The other thing you might manage it using Firestore Security Rules as well.
So you can code like most of the current social media works.
Simply let the user send a message but put a condition on the receiver
user side so if the user is blocked by the receiver then it should not show
the chat in the user chat list also should not send a notification if the user
is blocked by the receiver.

google hangout chat can bots message bots?

I have a use scenario where I'm testing a bot in google hangout. To facilitate testing of multiple users, I'd like to create a series of other bots that replicate the functions of users. But this is all dependent on the bots in the room listening to one another. It also requires that I get the userid of the bots so they can name each other. In Google Scripts I can find no way to retrieve that (the rest API is not an option).
Any suggestions?
The information is documented, but I understand GCP docs aren't the easiest to navigate. According to the Event Format reference: "Only messages from "real", non-bot users are delivered to bots. A bot will never receive messages posted by itself or by a different bot."
So the answer to the question appears to be no. Bots do not appear to be able to talk to each other. When you put the userid in the text property of the bot it does not replace it to an #botname as it does with human users. If anyone can figure out another way to do it I would appreciate it.
But the second question of where to get the bots userid I can now answer and I leave here in case anyone else is curious. This appears only in a message event, when a bot is mentioned as the property event.message.annotations[0].userMention.user.name

How to create a link to contact specific phone number via Telegram?

So I found out I could use a link like this in HTML:
WhatsApp
in order to let a user contact {{phone_number}} directly from a webpage (via WhatsApp web).
My question is: how to do the same but instead of WhatsApp, via Telegram?
Thank you in advance
Update (2022):
Links to phone numbers such as https://t.me/+1XXXXXXX will lead you to a web page the same as username links do, but you can only start chatting with the user if their privacy settings allows you.
Old answer:
It's NOT possible to link to Telegram like this for a phone numbers so far, because every user MUST add the phone number to their contact list before they can send a message to them by phone number. This limitation is because of Telegram privacy policy and abuse prevention. In more details, if Telegram allow this type of linking, a malicious party can fetch a web page like https://t.me/+1XXXXXXX for every possible number without passing authentication. That's most probably why Telegram doesn't have such linking feature.
However, you can link to #username of a Telegram user if he/she has any:
https://t.me/username
Welcome to StackOverflow.
You should create a link like https://telegram.me/YourUsername for that purpose.
Check Telegram blog for more info.
It is possible to create links to Telegram, WhatsApp and Signal accounts using their associated phone numbers using these URLs:
https://t.me/+41794997040
https://wa.me/+41794997040
https://signal.me/#p/+41794997040

Generate an email button to log a user into a web page without API

TLDR: Is it possible to email a login button which will open a web page and enter the appropriate user information into the username/password fields? Is it possible to embed this within an HTML button, or possibly in SQL injection? If so, where should I start my research to make this happen?
OK, so what I am tasked with is generating the billing lists for about 2000 non-technical users. Currently we use a third party billing site which does not have an API or any way to authenticate users from the URL heading. What we have been doing is using mail-merge to email users their username and password along with a link to the billing site. This is great, except that our users are... special. We get dozens of phone calls a day from elderly users who can't copy/paste the given information into the website.
What I am looking for is someone to point me in the right direction for making an email click here button that will open the web page, enter the username and password (from a CSV/XML of usernames/passwords) and click enter.
I'd even settle for opening the webpage with their credentials filled into the appropriate fields. Is there a way to do this? What is the best way to go about this?
Before we get into best practices/security, CC information isn't stored on the site, and the only user info view-able is the invoice, so security isn't a huge concern here since the users can't set their own passwords (username / password generated from static fields in another database silo).
Not looking for someone to do this project for me, but perhaps a few friendly pointers in the right direction for how to do this.
Is it possible to email a login button which will open a web page and enter the appropriate user information into the username/password fields?
Not unless either:
The website is specifically designed to allow that. Since you said it was a third party side, then you would have to ask the people who wrote it.
The site suffered from an XSS security vulerability. (Explaining how to search for one would be too broad for a SO answer, searching for one would be illegal pretty much everywhere).

Confirmation email sent to user in vb.net to mysql database

Just want to ask if there is some way to add automatic email confirmation to vb.net website.
I want that user create new account in the website and the website sent the confirmation link to them. Only if the confirmation email is clicked the user will be able to fully register.
I know that there are ways with build in login page from vb. But I'm using my own login. Mainly becouse the database where user connect is MySql.
something like this: http://www.asp.net/web-forms/videos/authentication/implement-the-registration-verification-pattern
Any idea where to look? most of the google search links are with php or to Microsoft Sql.
Thanks in advance for any good link or solution.
Petr
basically, when an user registers the account, you generate a confirmation # (I will use GUID), then send the user an email with the confirmation link. the confirmation link is the url of the confirmation page with the confirmation # as parameter, i.e. www.mysite.com/confirmation.aspx?code={guid} . you save the confirmation code in the database with the user account table (it could be in the same table or a separated table). the user has to click the confirmation url to confirm. when confirm, you just need to check whether the code is the same as the Guid in the database.
Basically, the process is the same and it has no much relation with mySQL or SQL Server.
here is an example, although it is C#, the same process, just a little bit different syntax in code:
http://www.webreference.com/programming/asp_net/registration-confirmation-system/index.html
also
asp.net confirmation mail send link that contains a unique identifier