Share a whatsapp contact over HTML - html

I would like to create an HTML link so that anyone could easily find me on whatsapp. There is URL Schema that whatsapp provides but there is no way I found on the documentation to share a contact. The only functionality the schema handles is that of sending a message and optionally include an user ID from the existing library.
How would you address this problem? Is there any way to create a contact in the phonebook using HTML? That will also work.
The closest thing I have found is the html "tel" tag, but that may launch other applications other than the contact list to add a new contact.

I found a solution for this issue. It is not perfect, but its the best approach.
Currently the whatsapp protocol does have any features for creating new contacts, but it does have one to send a message to one of your existing contacts/chats. So what I did is to share a message with my contacts details.
whatsapp://send?text=join%20me%20on%20TELEPHONE_NUMBER_HERE%20%3A)
This will open the whatsapp app an the user will see:
join me on TELEPHONE_NUMBER :)
It is not a perfect solution but is something if you want to add a whatsapp link in your site.
Hope it helps.

Related

Google Places API Reviews Widget

I'm trying to embed Google's "write a review" widget into my website. Much like what Podium.com does.
They host a page and load an iframe with the src:
https://www.google.com/maps/api/js/ReviewsService.LoadWriteWidget?key=THEIR_API_KEY&pb=!2m1!1sChIJ6VFjYpqa9YgREIJTX-XLyoE!3shttps%3A%2F%2Ftheir-url.com!5sen&cb=37369878
This renders the widget like so:
I dug into their html source and it appears they're using the Google Places Reviews Widget. I searched Google and Google Developers for "Google Places Reviews Widget" which returns results:
However, the links go to a 404 page:
https://developers.google.com/places/reviews/reference
https://developers.google.com/places/reviews/widgets
I've replicated what Podium is doing on my own page using my API key. However, the widget doesn't display. I don't get any errors, the iframe loads some scripts and some hidden html elements, but doesn't render the full widget.
Is this an API or feature that I'm unable to access? Has anyone implemented something similar?
I also had the exact same experience and reached out to Google about it.
Here's their preliminary reply on Sept 4, 2018
Apologies for the delay on this.
May I ask if you followed the steps here:
https://developers.google.com/places/reviews/#api-key
It says there that, "Before you begin coding, notify your Google
contact person that you intend to create a project to use the Google
Places API Reviews Widget. Indicate the email address of the Google
account you intend to use to manage the project. Google will use this
email address to allow you to activate the API for your project.
After your Google contact person has confirmed that your email address
can activate the Google Places API Reviews Widget, you can follow the
instructions here:
https://developers.google.com/places/reviews/#api-key to activate the
API and create your key.
May I ask if you have a contact person? If you don't have one,
apologies but the Review's Widget is not generally available, because
it needs some special authorization before it can be used. Please note
that we are investigating to see if you can get access to that Widget.
If you do have a contact person, please let me know.
Moving forward, may I ask what kind of places would you like to use
the Reviews Widget for?
Then this:
With regards to your intention in using the Review Widget, I would
like you to know that unfortunately, the Review Widget is not
available at the moment yet. We don have a date for expected general
availability for this product but I can get back to you and inform you
once the Review widget is already available publicly. Once again,
apologies for this inconvenience.
And finally:
The Reviews Widget is only actually limited to trusted partners as of
the moment. Moreover, the Review Widget team isn't looking for new
testers at the moment:
With that said, the public documentation on the Reviews Widget has
already been set into private. As mentioned, the Reviews Widget is not
yet available for the general public.
Sorry to be the bearer of bad news...
check this out... I dunno if this helps. i've been trying to figure this out too. A company called BirdEye has this Review Portal that opens the post-review widget on the page. I inspected the code and found that there are 2 JS scripts calling on Google's Places API (image attached). The button code I'm assuming hitting these scripts is just below. Does this make sense to anyone? I'm not able to get into the actual JS file though.
<button class="btnReviewSite2" data-source-url="https://www.google.com/search?q=Innovative+Roofing&ludocid=8385655751686277266&gws_rd=cr&fpstate=lie&lrd=0x87938c4de368e6b3:0x745fd57a1ff8c892,2#trex=m_t:lcl_akp,rc_f:nav,rc_ludocids:8385655751686277266" data-place-id="ChIJs-Zo402Mk4cRksj4H3rVX3Q" data-google-embedded="1" data-source-url_9="" data-source-id="2">
<span class="aggr-source-wrapper">
<span class="rev-site-2 presenceIcon aggr-source-2 aggr-dummy-source-g">
</span>
</span>
<span title="Review us on Google">
</span>
</button>
Google Places API JS Script

Alternative to mailto: to link email

I am creating a website and there is a page with people that are part of the company. Each person has an email that i want for the user to be able to get the email for the person that he/she want.
If we were in 2011 i would have used mailto: html tag. But really not so many people are using desktop email clients.
I thought about linking to a link so a new window would open in gmail and a new message would be created with recepient the pressed email. BUT not everyone uses gmail.
The only posible "solution" that i though that when the user clicks on the email this would be copied automatically in the clipboard. It would have the same result as doing CTRL & C at something. BUT this requires a lot of time and i dont want to get my hands dirty with javascript.
Is there any other way to do this ?
You should probably still use mailto:. mailto: is not intended for just desktops, it identifies a handler for the client. A mobile device would be able to recognize it just as well, and launch its preferred MTU.
With a lot of addons like smartaddon contact form and foxyform available out there, you could add them to your html code.
But, if you could use php, it to would just take few statements of code to set up the contact form on your own. Refer this post which explains clearly on how to set up your contact form using php.

Facebook post via API - include html, css, & outside images?

First off: I'm a designer, I'm not a developer. I don't really know php or JS, I know html and css. And that's not changing.
Context: I'm working on designing a website for a client that once it is turned over to the development team will involve using the facebook API to allow users to post things on their facebook walls. I'm not familiar with the facebook API at all and I don't really use facebook. However, I need to know the limitations of these things so I can actually design something that is possible to develop. I tried looking at the facebook API docs, but it's gibberish to me since I'm not a developer.
My actual question: I know text can be added, I know at least one main image can be added to go with the post. Can any custom html/css be added to the content of a facebook post? Specifically the client asked for the stars system on the website to the facebook posts (which would require custom html, css, and images from the site), but after working with the facebook share button/iframe I doubt facebook allows for that type of thing.
And if you don't mind posting a long answer: is there any control over what the post looks like, is that all set by facebook? Things like sizes of images, placement of content, etc. Or is this just another insert iframe (maybe with a few variables) and facebook has 100% control over what goes inside the iframe?
No, you can't control over what the post looks like using Facebook Graph API. Publishing a post only supports the following fields:
message: The main body of the post, otherwise called the status message. Either link or message must be supplied.
link: The URL of a link to attach to the post. Either link or message must be supplied.
actions: The action links attached to the post.
place: Page ID of a location associated with this post.
tags: Comma-separated list of user IDs of people tagged in this post.
privacy: Determines the privacy settings of the post.
object_attachment: Facebook ID for an existing picture in the person's photo albums to use as the thumbnail image.
Source: Graph API User Feed Reference.
As you can see, there is no field to customize the design/template of the post. In short, what you publish using the Graph API will just look like a typical post that you post using Facebook GUI.

adding context information to the URL

I need to add context or the current state of my website to the URL of the page.. So that if a user copies and sends the URL to another user. The other user can see the exact state of the website that the sender was watching, i.e. the tab he was in,and the data he was viewing. I have seen similar things being implemented in other websites like facebook, gmail, etc but I don't know how to do that in my application. How should I approach this problem?
Use pushState and friends to modify the URL to one which your server can use to deliver a page that starts in the desired state.

Metro App mailto protocol doesn't accept HTML?

I am trying to make a metro app which involves the user sending out an invitation email to friends. To do this, I am using the mailto:// protocol. However, if I try to include HTML tags in the body section, the Mail app reads them literally and displays raw HTML to the user. Is there any way to get around this?
All help is greatly appreciated and I always accept an answer!
I'm currently hunting for an answer to a similar problem, only in my case I also want to embed an image in the body of the email. I have not dug into the code much, but it seems like the Mail app does not handle all the protocols required to attach additional files to the html body. For the simple case though - you should be able to share your html being the share source and invoking the share charm. You are not limiting the user from using other applications as share targets for your html and you probably can't define the subject or recipients, but it's the best I could find.
There is a sample you can check here: "Sharing content source app sample".