Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I created a Telegram Bot using BotFather. My point is to notify users about sale events in the system. I can notify them when I know exactly their chat_id directly to private messages. How should I get their chat_id using their mobile number? I have an idea of getting chat_id when they subscribe into my group, but I don't know whether if it's correct way or not.
I edited my question. I'll be really appreciate if my question has got more correct.
If you use Telegram bot API to notify your users (I see you mentioned telegram-bot in tags), the documentation page says:
Bots can't initiate conversations with users. A user must either add them to a group or send them a message first.
So in order to communicate with particular user bot must receive a message from him first and then you can get chat_id from received Message object.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am having a little problem.Well,I know how to let user share my website link on whatsapp.but can't able to figure out how to ensure that he/she actually shares it on whatsapp.
I think you can use some cheking on your url, for example www.yoursite.com/yourUser, when you share that on WhatsApp the App request the site to show some info, there in your code you can check the user agent and look for some whatsapp reference... then if you find it you can do whatever you want with that, but you need on your url something to identify the user to make the action...
I don't think there is a perfect solution for this, but we can get close by generating urls with a unique slug/parameter for each user. Then check the user-agent string for WhatsApp when someone requests the url. WhatsApp will probably try to load metadata from the url when the user is about to share. You could also filter out the users own IP address and wait for someone else to see it in WhatsApp to confim it has beed shared.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a Social Network type Laravel application where users can comment and follow each other, and subscribe a page/user to get notification whenever a new blog/post has been published by the page.
Suppose, 1000+ users has subscribed to get notification for a page. Now, whenever the page publishes a post, I should send notification to all users who has subscribed.
I have a table for notifications like:-
user_id - the user who has subscribed
page_id - the page who published the blog/post
notification - the notification text (same for all users)
Basically, I want to send the notification to all users who has subscribed to the page. In laravel, I can use loop or chunk for all users to add rows to the database. But I want to know what will be the most robust way to send notification to users in laravel. Thanks.
Definitely consider looking into Laravel's Queue for this. It will give a fine tuned control over how many get sent at once, when they get sent and how to handle the case of failure. I use the Queue + Redis for a lot of very similar functionality. https://laravel.com/docs/5.4/queues
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I need to ask few questions:
a. How can I create whatsapp like groups?
b. How can I implement group chat similar to whatsapp?
Right now I am creating rooms and invite users into them. Users automatically removed from room,when users go offiline.
But in whatsapp group chat users still remain in group after logout or not connected and when users come online, they get all offline messages.
Please suggest me how can I create group chat similar to whatsapp group chat where group owner can add users, ban, UN-ban and get off-line message as well.
Please help me giving few tips and links to study.
Regards,
Sandeep Kumar Thakur
You should use ejabberd Muc/Sub feature to build groups like Whatsapp: https://docs.ejabberd.im/developer/xmpp-clients-bots/proposed-extensions/muc-sub/
It has been designed with that use case in mind.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm creating a website that requires user to sign up in order to get an account.I was just wondering, what type of api/code/etc do I need to use to send a verification code to directly to their phones.Once they receive the message they should be able to send like a text to that number (ex: send yes to confirm to the number #987) and the account automatically gets confirm from the text message.
Here you've got a list of SMS APIs: http://blog.mashape.com/list-of-50-sms-apis/. It's from 2013 though, some of them might have changed. You do have free APIs like http://textbelt.com/ but it depends on where do you want to send those SMSem, different providers in different countries have different gateways. I think it's impossible to answer you in 1 sentence.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i have installed the socket.io webchat and I want to add moderation-functionality for the posted comments. Does anyone know how to do that? It should work like when i post a message, the moderator hast du either accept/approve or delete the message. When he approves it, the message will be visible in the chat, otherwise it will not be visible.
any help or suggestion is welcome!
Socket.io is more for real time communication. You actually need something between the data sending and receiving. So, I guess that you should avoid the web sockets and store the comments in a database. The moderator then will need to read them and approve/deny. However such implementation is not really good idea when you have a web chat.
You could also try to send the comments to only one user (the moderator). And if he approve the comment just to resend it with a flag approved. All the messages which don't have this flag should not be shown.