How to send message from Website To Telegram direct 1 number target? - javascript

i add the form message (html standart) and button(submit) from website to telegram APP, direct number precise: +00 123 456 789 (this is example number TARGET A).
this is for mobile (iOS,android) who has installed telegram app.
If users (any people) have not it the number contact "TARGET A" then add new contact..
If users (any people) have it the number contact "TARGET A" then send it direct in telegram app mobile..
If users (any people) have not the telegram app then re-direct other page: www.company.com/miss-telegram.html
i will write the message : sorry, you have not the app Telegram, if want to add the app telegram then click, go to link: https://play.google.com/store/apps/details?id=org.telegram.messenger for andorid or https://itunes.apple.com/it/app/telegram-messenger/id686449807 for Ios..
can you help me how build it?
note: i'm base html build and not expert.. i'm newbie..
note: i dont know what is best code language: javascript, html5,php,..
you can try different code for javascript, for html5, for php..to see what is best solution (easy)..
thank you
so i dont know how builds it from html standart for send to telegram direct target number..

Related

Redirection to microsoft teams app from browser

I'm working on angular project and I have a teams icon in .html. I need to redirect from browser to the teams app when the icon is clicked. Similar functionality is implemented for mail and phone number. When a user clicks on phone icon or mail icon, I'm doing this:
window.location.href = 'tel: 456****';
windo.location.href = 'mailto: example#gmail.com'
Tried for a while to know what should be assigned to window.location.href so that the redirection happens to teams app and didn't find any way for it. How do I redirect to teams using window location?
Take a look at the official documentation here:
https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-links#deep-linking-to-an-audio-or-audio-video-call
There's examples for both if you have an email address and if you have a phone number. (You'll need that 4: part before the phone number.)
https://teams.microsoft.com/l/call/0/0?users={emailaddress}
https://teams.microsoft.com/l/call/0/0?users=4:{phonenumber}

How to get User's actual Email Id in Outlook Add-in Integration

I have integrated created one Add-In to be integrated in Outlook Mail.
I have used Office inbuilt code (Javascript Code) for it.
Now to test Add-in i have signup in Microsoft with my personal email id.After sign up i found that in Outlook Mail, there are two different Mail Ids in Profile.
like
alex.p#***.com
outlook_1203434#outlook.com
now i need the first one for validation but i am getting the second one every time.
I used below code for that.
Office.initialize = function (reason) {
item = Office.context.mailbox.item;
console.log(Office.context.mailbox.userProfile.displayName);
console.log(Office.context.mailbox.userProfile.emailAddress);
}
Please suggest me some other way to get the users email id.
The documentation for the Outlook JavaScript API ( https://dev.office.com/docs/add-ins/develop/understanding-the-javascript-api-for-office#mailbox-object ) implies that your code runs only within a mailbox context which only exposes that specific mailbox's data, so you cannot access any information about other mailboxes.
I had a quick search and I don't think it's possible to enumerate email addresses associated with a mailbox, nor information about other mailboxes in Desktop Outlook or whatever the OWA equivalent is.

Office JavaScript API for Outlook - how can I refresh my web add-in when location changes?

I'm doing some research on possibilities of Office JavaScript API for Outlook. What I'd like to do is to have a web add-in that will be able to refresh itself (reload with relevant content) when user add someone to "to" field or changes "location" field creating new appointment.
I've found a way to read/write those fields i.e. like this:
Office.context.mailbox.item.subject.getAsync(function (result) {
var subject = result;
});
But can't find a solution to somehow bind to 'changed' event on them. Is it at all possible with Office JavaScript API and Outlook?
Best regards,
Kacper
While you can create bindings in Excel & Word (see: http://dev.office.com/reference/add-ins/shared/bindings.bindings), you cannot in Outlook as of this moment, unfortunately. You could periodically poll (not a great solution), or try to make sure the user adds recipients through the add-in, you can from there on set the recipients in the email as well(see: http://dev.office.com/docs/add-ins/outlook/get-set-or-add-recipients).
Jesse

Is there any way to find phone number from string?

I am stack to finding a filter or any way to find a phone number from string. Actually I get a response in string and there is a phone number too and client want to make link because of smart-phone when user tab on it. it's goes to call directory.
here is client request to do with response.
"Low priority but could we make it so that the phone number is a hyper link so the user can press and it goes to make call.
I.e.
0035312998080
Or
+35312998080"
here is a test response.
Unable to process this booking online it is too close to the party date. To book please phone Fun Fitness - Play Centre on 353 - 1 - 2998080
Why do you need to find it? It's right there...
To make it callable:
555-555-1212
Stolen from How to create hyperlink to call phone number on mobile devices?

Add Whatsapp function to website, like sms, tel

I have a website that a lot of people view on mobile.
I have link for : Call and SMS and I want to add one for Whatsapp, so a user can click the whatsapp link I create and start a conversation with me.
If this is possible can someone point me in the right direction on how?
below link will open the whatsapp. Here "0123456789" is the contact of the person you want to communicate with.
href="intent://send/0123456789#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">
Check this link out
Launching Your iPhone App Via Custom URL Scheme
and more on the whats up url scheme document
I did a quick mock up and tried it on my iphone with a link like this from a webpage and it opened the app on my iphone.
whatsapp
I could not try to send a message as I don't have a current Whatsapp account sorry.
Add user name using abid parameter
let's say your whatsapp username was username then it would be
whatsapp
once again sorry I can't test this. Also I have no idea what would happen if the username is the actual user of the current mobile device. eg. You try to whatsapp yourself.
Here is the solution to your problem! You just need to use this format:
In the place of "urlencodedtext" you need to keep the content in Url-encode format.
UPDATE-- Use this from now(Nov-2018)
Use: https://wa.me/15551234567
Don't use: https://wa.me/+001-(555)1234567
To create your own link with a pre-filled message that will
automatically appear in the text field of a chat, use
https://wa.me/whatsappphonenumber/?text=urlencodedtext where
whatsappphonenumber is a full phone number in international format and
URL-encodedtext is the URL-encoded pre-filled message.
Example:https://wa.me/15551234567?text=I'm%20interested%20in%20your%20car%20for%20sale
To create a link with just a pre-filled message, use
https://wa.me/?text=urlencodedtext
Example:https://wa.me/?text=I'm%20inquiring%20about%20the%20apartment%20listing
After clicking on the link, you will be shown a list of contacts you
can send your message to.
For more information, see https://www.whatsapp.com/faq/en/general/26000030
This is possible by creating the following link:
whatsapp://send?text=Hello this has been opened from the browser&phone=+PHONENUMBER&abid=+PHONENUMBER
Thanks to:
https://forum.ionicframework.com/t/open-whatsapp-intent-with-msg-specific-contact/73903/4
I have tested this on iOS, Windows Phone and Android
I just posted an answer on a thread similiar to this here https://stackoverflow.com/a/43357241/3958617
The approach with:
whatsapp
and with
whatsapp
Only works if the person who clicked on your link have your number on their contact list.
Since not everybody will have it, the other solution is to use Whatsapp API like this:
Send Message
More details on this API here: https://www.whatsapp.com/faq/en/general/26000030
And observations on how to use it here: https://stackoverflow.com/a/43357241/3958617
Use:
https://wa.me/YOURNUMBER
where YOURNUMBER is without the two leading 00.
For instance for +37061204312 you write:
https://wa.me/37061204312
This link seems to work on mobiles and on desktop computers.
To prefill the message with text you can use:
https://wa.me/YOURNUMBER/?text=urlencodedtext
More in the Whatsapp FAQ: https://faq.whatsapp.com/en/android/26000030/
Rahul's answer gives me an error: You seem to be trying to send a WhatsApp message to a phone number that is not registered with WhatsApp..., even though I'm sending it to a registered WhatsApp number.
This, however works:
<li><a href="intent:0123456789#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end"><i class="fa fa-whatsapp"></i>+237 655 421 621</li>

Categories