Skip to content

Commit

Permalink
Merge pull request #3 from paodb/fix-drivers-links
Browse files Browse the repository at this point in the history
Fix drivers links
  • Loading branch information
parsagholipour authored Sep 24, 2023
2 parents 50e9cea + 2f614dc commit 51c0865
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/drivers/FacebookDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export default class FacebookDriver extends Driver implements hasLink {
}

getLink(): string {
return `https://twitter.com/share?text=${encodeURIComponent(this.options?.shareText!)}&url=${this.options?.shareLink}`
return `https://facebook.com/sharer/sharer.php?u=${this.options?.shareLink}&t=${encodeURIComponent(this.options?.shareText!)}`
}
}
2 changes: 1 addition & 1 deletion src/lib/drivers/LinkedinDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export default class LinkedinDriver extends Driver implements hasLink {
}

getLink(): string {
return `https://www.linkedin.com/sharing/share-offsite/?url=${this.options?.shareLink}`
return `https://www.linkedin.com/shareArticle?url=${this.options?.shareLink}`
}
}
2 changes: 1 addition & 1 deletion src/lib/drivers/TwitterDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export default class TwitterDriver extends Driver implements hasLink {
}

getLink(): string {
return `https://twitter.com/share?text=${encodeURIComponent(this.options?.shareText!)}&url=${this.options?.shareLink}`
return `https://twitter.com/intent/tweet?text=${encodeURIComponent(this.options?.shareText!)}&url=${this.options?.shareLink}`
}
}
2 changes: 1 addition & 1 deletion src/lib/drivers/WhatsappDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export default class WhatsappDriver extends Driver implements hasLink {
}

getLink(): string {
return `whatsapp://send?text=${this.options?.shareText} \n ${this.options?.shareLink}`
return `https://wa.me?text=${this.options?.shareText} \n ${this.options?.shareLink}`
}
}

0 comments on commit 51c0865

Please sign in to comment.