직접 URL 체계를 사용하면 무거운 서드파티 추적 위젯 스크립트 없이도 가볍고 안전한 소셜 공유 버튼을 구축할 수 있습니다.
소셜 공유 URL 엔드포인트
Twitter / X
https://twitter.com/intent/tweet?url={URL}&text={TEXT}&via={USER}&hashtags={TAGS}
https://www.facebook.com/sharer/sharer.php?u={URL}
https://www.linkedin.com/sharing/share-offsite/?url={URL}
Telegram
https://t.me/share/url?url={URL}&text={TEXT}
https://api.whatsapp.com/send?text={TEXT}%20{URL}
https://reddit.com/submit?url={URL}&title={TITLE}
네이티브 Web Share API (최신 브라우저)
if (navigator.share) {
navigator.share({
title: document.title,
text: '이 치트시트를 확인해보세요!',
url: window.location.href
});
}