App icon indicating copy to clipboard operation
App copied to clipboard

Add meta tags to Expensify.cash html for link previews

Open marklouisdeshaun opened this issue 5 years ago • 10 comments

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):

  1. Copy link to https://expensify.cash
  2. 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
  3. 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 image

Current link preview on iOS/WhatsApp image

Desired link preview (image): 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 avatar Jan 21 '21 21:01 marklouisdeshaun

@marklouisdeshaun Thanks. I will work on this. So I have few questions:

  1. Do you want it to look like Expensify.com image

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 avatar Jan 22 '21 22:01 parasharrajat

@parasharrajat I'm just asking for confirmation from the team now and will let you know as soon as I can!

marklouisdeshaun avatar Jan 22 '21 22:01 marklouisdeshaun

@marklouisdeshaun Thanks. Some matching example will be really helpful to Identify the exact requirement.

parasharrajat avatar Jan 22 '21 22:01 parasharrajat

@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.

marklouisdeshaun avatar Jan 22 '21 22:01 marklouisdeshaun

Ok. Thanks. It's clear now.

parasharrajat avatar Jan 22 '21 22:01 parasharrajat

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 avatar Jan 25 '21 16:01 marklouisdeshaun

@marklouisdeshaun Sorry about that. But I thought it is mentioned to add meta links.

Proposed Solution:

  1. I have added meta links into the web/index.html file 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.

parasharrajat avatar Jan 25 '21 23:01 parasharrajat

The solution sounds good to me.

shawnborton avatar Jan 26 '21 09:01 shawnborton

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" />

shawnborton avatar Jan 26 '21 10:01 shawnborton

Sure. I will remove the twitter:title and twitter:image.

parasharrajat avatar Jan 26 '21 11:01 parasharrajat