-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[guides] add Prompting Users to Share Incentivized Links Guide #7342
base: main
Are you sure you want to change the base?
Conversation
const customId = await createPromotionalCustomId(); | ||
|
||
try { | ||
const { success } = await DiscordRPC.commands.shareLink({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this shareLink
method display a modal for picking share destinations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
if (success) { | ||
// Track successful share for analytics/limiting | ||
await trackSuccessfulShare(customId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a user clicks a "copy link" button in the modal but then closes it without doing on-platform sharing, what is the value of success
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
success will be true upon copy
Co-authored-by: advaith <[email protected]>
|
||
When implementing sharing, you'll need to: | ||
1. Generate a unique ID for tracking the promotion | ||
2. Call the `shareLink` command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking to the reference will help answer questions like @brad-discord asked below. We can also mention explicitly in the copy. "share the link via a modal".
2. Call the `shareLink` command | |
2. Call the [`shareLink`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelink) command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're going to be doing a refresh of these guides and design patterns and will be more heavily linking to the reference
- Track and validate referrals to prevent abuse | ||
- Handle edge cases like expired promotions gracefully | ||
- Consider implementing cool-down periods between shares | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--- | |
No description provided.