status-im / universal-links-handler

Serving assets for handling universal links
http://join.status.im
MIT License
5 stars 4 forks source link

Support Twitter and Telegram link unfurling #55

Closed hesterbruikman closed 4 years ago

hesterbruikman commented 4 years ago

Problem

Using a chat key, shared outside of Status, is not as convenient as it can be. Reducing any barriers to allow users to 'promote' Status by sharing their chat key can increase acquisition.

join.status.im currently supports Twitter cards, OpenGraph and iFramely with a generic https://status.im/img/share-get-status.png image. When a chat key is added, no description or thumbnail is included

To make it easier for people to act on a join link being shared on Twitter or Telegram, the thumbnail should be a image link to a png of the QR code image.

User story

Solution

When sharing a https://join.status.im/u/... link on Telegram or Twitter, the QR code should be included as a image link to a png of the QR.

Meta data

cc @j-zerah for review Title: Join me on Status Description: Private communication. Available on mobile: iOS, Android and Desktop (Beta): Mac, Linux, or Windows Thumbnail: https://status.im/img/ chatkey

Next steps

Styling of the png, to include a Status wordmark/tagline and identicon of the chat key

jakubgs commented 4 years ago

I assume this should just work if we set the Open Graph properties like we do on the main site: https://github.com/status-im/status.im/blob/84dfcf04ed8b877c84253e2f13d55d02e13b15ba/themes/navy/layout/partial/head.ejs#L35-L41 Example:

    <meta property="og:site_name" content="Status" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="Status - Private, Secure Communication" />
    <meta property="og:description" content="Status brings the power of Ethereum into your pocket by combining a messenger, crypto-wallet, and Web3 browser." />
    <meta property="og:url" content="https://status.im/index.html" /> 
    <meta property="og:image" content="https://status.im/img/share.png" />
jakubgs commented 4 years ago

This might be a pain in the ass, because by default a QR code is square, so it gets cropped/obscured: og_preview_01 Used https://www.opengraph.xyz/ to check.

jakubgs commented 4 years ago

Done and done: https://www.opengraph.xyz/url/https:%2F%2Fjoin.status.im%2Fu%2Fjakubgs.eth/

jakubgs commented 4 years ago

We can now adjust how the image looks in a separate PR. The relevant part is: https://github.com/status-im/universal-links-handler/blob/33bc461ca2637bfad34efeac9854f7278f3ba19f/routes/index.js#L191-L202 I add the Status logo in the SVG XML. We can adjust that to include some other things.