diff --git a/static/app-strings.json b/static/app-strings.json index 4a1107b24..5b312e69b 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2065,5 +2065,6 @@ "Reset": "Reset", "Reset to original (previous) publish date": "Reset to original (previous) publish date", "Search for something...": "Search for something...", + "Show reply": "Show reply", "--end--": "--end--" } diff --git a/ui/component/socialShare/view.jsx b/ui/component/socialShare/view.jsx index 005387538..45739c49b 100644 --- a/ui/component/socialShare/view.jsx +++ b/ui/component/socialShare/view.jsx @@ -14,6 +14,12 @@ import { URL, SHARE_DOMAIN_URL } from 'config'; const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL; const IOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform); const SUPPORTS_SHARE_API = typeof navigator.share !== 'undefined'; +const IS_ODYSEE = SHARE_DOMAIN === 'https://odysee.com'; + +// Twitter share +const TWITTER_LBRY = 'LBRYcom'; +const TWITTER_ODYSEE = 'OdyseeTeam'; +const TWITTER_INTENT_API = 'https://twitter.com/intent/tweet?'; type Props = { claim: StreamClaim, @@ -68,6 +74,16 @@ function SocialShare(props: Props) { ); const downloadUrl = `${generateDownloadUrl(name, claimId)}`; + // Tweet params + let tweetIntentParams = { + url: shareUrl, + via: IS_ODYSEE ? TWITTER_ODYSEE : TWITTER_LBRY, + text: title || claim.name, + hashtags: 'LBRY', + }; + // Generate twitter web intent url + const tweetIntent = TWITTER_INTENT_API + new URLSearchParams(tweetIntentParams).toString(); + function handleWebShareClick() { if (navigator.share) { navigator.share({ @@ -115,7 +131,7 @@ function SocialShare(props: Props) { iconSize={24} icon={ICONS.TWITTER} title={__('Share on Twitter')} - href={`https://twitter.com/intent/tweet?text=${encodedLbryURL}`} + href={tweetIntent} />