Skip to content

Commit

Permalink
fix facebook url
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-justin committed Jan 27, 2025
1 parent 1e32182 commit 62602c0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pages/Funds/Fund/share.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,14 @@ function generateShareLink(
switch (type) {
case "x":
//https://developer.twitter.com/en/docs/twitter-for-websites/tweet-button/guides/web-intent
return `https://x.com/intent/tweet?text=${encodedText}&url=${url}`;
return `https://x.com/intent/tweet?text=${encodedText}&url=${encodedURL}`;
/**
* feed description is depracated
* https://developers.facebook.com/docs/sharing/reference/feed-dialog#response
* NOTE 6/3/2024: must rely on OpenGraph metadata
*/
case "fb":
return `https://www.facebook.com/dialog/share?app_id=1286913222079194&display=popup&href=${encodeURIComponent(
encodedURL
)}&quote=${encodedText}`;
return `https://www.facebook.com/dialog/share?app_id=1286913222079194&display=popup&href=${encodedURL}&quote=${encodedText}`;

//https://core.telegram.org/widgets/share#custom-buttons
case "telegram":
Expand Down

0 comments on commit 62602c0

Please sign in to comment.