Skip to content

Commit 2c0e95d

Browse files
authored
Fix syntax errors in Generating a Link for Growth and Referrals (#7530)
1 parent 03bb960 commit 2c0e95d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/activities/development-guides/growth-and-referrals.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ const linkIdResponse = await fetch(`${env.discordAPI}/applications/${env.applica
166166
method: 'POST',
167167
headers: {
168168
Authorization: `Bearer ${accessToken}`,
169+
'Content-Type': 'application/json',
169170
},
170171
body: {
171-
custom_id: 'user_123/game_456'
172+
custom_id: 'user_123/game_456',
172173
description: 'I just beat level 10 with a perfect score',
173174
title: 'Check out my high score!',
174175
image,
@@ -178,7 +179,8 @@ const {link_id} = await linkIdResponse.json();
178179

179180
// Open the Share modal with the generated link
180181
const {success} = await discordSdk.commands.shareLink({
181-
linkId: link_id
182+
message: 'Check out my high score!',
183+
link_id,
182184
});
183185
success ? console.log('User shared link!') : console.log('User did not share link!');
184186
```

0 commit comments

Comments
 (0)