Add meta tags to Expensify.cash html for link previews
If you haven’t already, check out our contributing guidelines for onboarding!
View the job on Upwork here
Platform - version:
iOS
Android
Action Performed (reproducible steps):
- Copy link to https://expensify.cash
- Send the link via: a. iPhone iMessage b. iPhone apps: WhatsApp, Facebook, Slack, Twitter c. Android Text Message d. Android apps: WhatsApp, Facebook, Slack, Twitter
- Take note of the link preview that is generated (or not generated)
Desired Result: Add meta tags to Expensify.cash HTML to generate a different selected preview and description (image file and description copy will be provided).
File: expensifycash_metapreviewimage.png.zip
Actual Result: Sharing a link to expensify.cash either doesn't generate a preview (e.g., WhatsApp) or generates a very basic preview (e.g., iMessage)
Notes/Photos/Videos:
Current link preview on iOS/iMessage

Current link preview on iOS/WhatsApp

Desired link preview (image):

Desired link preview (copy):
Chat and payments are now the same thing. Launching Summer 2021, join the waitlist to be first in line!
@marklouisdeshaun Thanks. I will work on this. So I have few questions:
- Do you want it to look like Expensify.com

But with
Chat and payments are now the same thing. Launching Summer 2021, join the waitlist to be first in line!
and the new Image.
@parasharrajat I'm just asking for confirmation from the team now and will let you know as soon as I can!
@marklouisdeshaun Thanks. Some matching example will be really helpful to Identify the exact requirement.
@parasharrajat - the team confirmed it should look like the Expensify.org preview option (the bottom one in the screenshot), and yes with the new copy and the Expensify.cash logo.
Just let me know if that's not clear enough or if you have other questions.
Ok. Thanks. It's clear now.
Hi @parasharrajat! We require a description of the proposed solution before reviewing the PR. Can you provide a brief description of the solution you plan to implement? Thanks!
@marklouisdeshaun Sorry about that. But I thought it is mentioned to add meta links.
Proposed Solution:
- I have added meta links into the
web/index.htmlfile which will help providers to fetch the correct link preview while using Expensify.cash link. I have added only the required tags so far
<meta property="og:site_name" content="Expensify.cash">
<meta property="og:type" content="website">
<meta property="og:url" content="https://expensify.cash">
<meta property="og:title" content="Chat and payments are now the same thing. Launching Summer 2021, join the waitlist to be first in line!">
<meta property="og:image" content="https://expensify.cash/[email protected]">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://expensify.cash">
<meta property="twitter:title" content="Chat and payments are now the same thing. Launching Summer 2021, join the waitlist to be first in line!">
<meta property="twitter:image" content="https://expensify.cash/[email protected]">
Here og:title and og:image is the needed one for most of the providers but to achieve the same result on Twitter I have added Twitter tags as well.
The solution sounds good to me.
Apologies, I left a comment in your PR but actually for the proposed solution, it looks like we can remove some of the Twitter-specific tags you are using (notably the twitter:title tag) as Twitter works well with the standard Open Graph (og) protocol. Take a look here (bottom of page), this would be an ideal set of tags:
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@nytimesbits" />
<meta name="twitter:creator" content="@nickbilton" />
<meta property="og:url" content="http://bits.blogs.nytimes.com/2011/12/08/a-twitter-for-my-sister/" />
<meta property="og:title" content="A Twitter for My Sister" />
<meta property="og:description" content="In the early days, Twitter grew so quickly that it was almost impossible to add new features because engineers spent their time trying to keep the rocket ship from stalling." />
<meta property="og:image" content="http://graphics8.nytimes.com/images/2011/12/08/technology/bits-newtwitter/bits-newtwitter-tmagArticle.jpg" />
Sure. I will remove the twitter:title and twitter:image.