Uh oh!
There was an error while loading. Please reload this page.
feat(profile): add Open Graph meta tags for social sharing (@TryOmar) - #6598
Conversation
Add Open Graph meta tags to user profile pages to improve how they appear when shared on social media platforms. This includes title, description and URL meta tags. Closesmonkeytypegame#6597
fehmer
commented
May 26, 2025
hi @TryOmar , thank you for your contribution. I am not sure this will actually work. I tested it before with discord links and discord is using the meta information from the page source and does not excute the javascript first. I created a demo but i don't have linkedin. Can you test this for me? https://fehmer.info/linkedin/?profile=Bob The desired result would be a link to the same page with title |
TryOmar
commented
May 26, 2025
Hi @fehmer, thanks for the smart way of testing! Fortunately, it worked — LinkedIn directed to I think the tags might be the reason it worked. <head><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible" content="IE=edge"><metaname="viewport" content="width=device-width, initial-scale=1.0"><title>Default title</title><metaproperty='og:title' content='Default title' /><metaproperty='og:image' content='/default.png' /><metaproperty='og:description' content='Default description' /><metaproperty='og:url' content='https://fehmer.info/linkedin' /></head>Recording.2025-05-26.124400.mp4 |
Also, here's a helpful LinkedIn help post: "Make your website shareable on LinkedIn": https://www.linkedin.com/help/linkedin/answer/a521928 I shared it in the issue, but adding it here as well since it includes more useful details (in case someone didn't notice it). |
fehmer
commented
May 26, 2025
the title is still the default title so it doesnt fully work. Maybe we only set the What we could do is add a call to the page-controller to update the meta Instead of removing all meta elements please just update the |
Update the Open Graph URL meta tag dynamically on every page transition to ensure correct URL sharing on social media platforms. This fixes the issue where profile links were redirecting to the homepage when shared on LinkedIn. Closesmonkeytypegame#6597
TryOmar
commented
May 26, 2025
Hey @fehmer , I finished the fix for dynamic |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Move the call to `updateOpenGraphUrl` after the `beforeShow` hook in the `change` function based on review feedback. Remove unnecessary comments related to the `updateOpenGraphUrl` function and its call for code cleanup. Closesmonkeytypegame#6597
TryOmar
commented
May 26, 2025
For anyone interested, I’ve started a follow-up discussion about the broader SEO and social sharing challenges related to static meta tags and possible solutions here: #6603 Feedback and insights from the team are very welcome! |
…monkeytypegame#6598) Add Open Graph meta tags to user profile pages to improve how they appear when shared on social media platforms. This includes title, description and URL meta tags. Closesmonkeytypegame#6597 ### Description This PR adds Open Graph Protocol (OGP) meta tags to user profile pages to fix the issue with LinkedIn and other social media platforms incorrectly redirecting profile links to the homepage. The implementation: - Adds dynamic Open Graph meta tags for title, description and URL - Updates tags whenever a profile page is loaded - Uses the user's name in the title tag for better personalization ### Checks - [x] Check if any open issues are related to this PR; if so, be sure to tag them below. - [x] Make sure the PR title follows the Conventional Commits standard. - [x] Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title. <!-- label(optional scope): pull request title (@your_github_username) --> Closesmonkeytypegame#6597 <!-- pro tip: you can mention an issue, PR, or discussion on GitHub by referencing its hash number e.g: [monkeytypegame#1234](monkeytypegame#1234) --> <!-- pro tip: you can press . (dot or period) in the code tab of any GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
Add Open Graph meta tags to user profile pages to improve how they appear when shared on social media platforms. This includes title, description and URL meta tags.
Closes#6597
Description
This PR adds Open Graph Protocol (OGP) meta tags to user profile pages to fix the issue with LinkedIn and other social media platforms incorrectly redirecting profile links to the homepage. The implementation:
Checks
Closes#6597