How do I change the text that appears when I share my URL

How do I change the text that appears when I share my URL on something like imessage. right now it shows "My open saas app" like in the image attached
No description
1 Reply
kapa.ai
kapa.ai4mo ago
Hi @haarismian. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To change the text that appears when you share your URL, you would typically need to modify the Open Graph tags (og:tags) in your application's HTML. These tags control the title, description, and image that are displayed when your URL is shared on platforms like iMessage, Facebook, Twitter, etc. In Wasp, you can insert static og:tags in the main.wasp file's head section. For example, you might have something like this in your main.wasp file:
mainPage: import Main from "@ext/Main.js"
{ title: "My Open SaaS App"
, head:
"""
<meta property="og:title" content="My Open SaaS App" />
<meta property="og:description" content="Description of my app." />
<meta property="og:image" content="URL_to_image.png" />
"""
}
mainPage: import Main from "@ext/Main.js"
{ title: "My Open SaaS App"
, head:
"""
<meta property="og:title" content="My Open SaaS App" />
<meta property="og:description" content="Description of my app." />
<meta property="og:image" content="URL_to_image.png" />
"""
}
You would need to replace "My Open SaaS App" with the title you want to display, "Description of my app." with your desired description, and "URL_to_image.png" with the URL to the image you want to show. However, based on the knowledge sources provided, there doesn't seem to be a way to dynamically assign values to these attributes based on the environment directly within the main.wasp file. For more dynamic behavior, you might need to use JavaScript to modify these tags at runtime. Please note that changes to og:tags might not be immediately reflected when you share your URL, as platforms like iMessage, Facebook, Twitter, etc., cache this information. You might need to use a tool like Facebook's Sharing Debugger to clear the cache and see your changes. For more information, you can refer to the Wasp documentation (https://wasp-lang.dev/docs/general/cli#overview) and this Github discussion (https://github.com/wasp-lang/open-saas/blob/main/app/main.wasp#L8) on setting environment-specific values in the main.wasp file. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Want results from more Discord servers?
Add your server