FastComments.com


FastComments๋Š” ํŽ˜์ด์ง€๋ณ„ ๋ฐ˜์‘์˜ ์—ฌ๋Ÿฌ ์œ ํ˜•์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” "ํŽ˜์ด์ง€ ๋ฆฌ์•กํŠธ"(์ด ํŽ˜์ด์ง€ ํ•˜๋‹จ์— ๋ฐ๋ชจ๋จ)๋ผ๊ณ  ๋ถ€๋ฅด๋Š”, ์‚ฌ์šฉ์ž ์ •์˜ ๊ฐ€๋Šฅํ•œ ์ด๋ชจ์ง€ ๋˜๋Š” ์•„์ด์ฝ˜์„ ์ง€์›ํ•˜๋ฉฐ, ํ‘œ์‹œ๋  ์ˆ˜ ๋Œ“๊ธ€ ์˜์—ญ ์œ„์—.

์šฐ๋ฆฌ๋Š” ๋˜ํ•œ ํ™”๋ฉด ์˜ค๋ฅธ์ชฝ ํ•˜๋‹จ์— ๋‚˜ํƒ€๋‚˜๋Š” Floating Likes ์œ„์ ฏ๋„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ฌธ์„œ๋Š” ๋‘˜ ๋‹ค ๋‹ค๋ฃน๋‹ˆ๋‹ค.


ํŽ˜์ด์ง€ ๋ฆฌ์•ก์…˜ Internal Link


Page Reacts ์œ„์ ฏ์€ ๋Œ“๊ธ€ ์œ„์ ฏ์— ์‚ฌ์šฉ์ž ์ •์˜ ๊ฐ€๋Šฅํ•œ ๋ฐ˜์‘ ์•„์ด์ฝ˜ ์„ธํŠธ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

์‚ฌ์šฉ์ž๋Š” ์ด๋ฏธ์ง€๋ฅผ ํด๋ฆญํ•˜์—ฌ ๋ฐ˜์‘ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ํŽ˜์ด์ง€๋ณ„๋กœ ์„ ํƒํ•œ ๋ฐ˜์‘์„ ๊ธฐ์–ตํ•ฉ๋‹ˆ๋‹ค. fastcomments.com์— ๋กœ๊ทธ์ธํ•œ ๊ฒฝ์šฐ ์ด๋Š” ๊ทธ๋“ค์˜ ๊ณ„์ •์— ์—ฐ๊ฒฐ๋ฉ๋‹ˆ๋‹ค.

์•„๋ž˜ ์˜ˆ์ œ์—์„œ Run์„ ํด๋ฆญํ•˜๋ฉด ์ž‘๋™ ๋ชจ์Šต์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


์„ค์น˜ - ๋ฐ”๋‹๋ผ JS Internal Link

ํŽ˜์ด์ง€ ๋ฆฌ์•ก์…˜์—์„œ๋Š” ๋‘ ๊ฐ€์ง€๋ฅผ ๊ฒฐ์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค:

  • ์–ด๋–ค ๋ฆฌ์•ก์…˜ ์ด๋ฏธ์ง€๋ฅผ ์‚ฌ์šฉํ• ์ง€.
  • ๊ฐ ๋ฆฌ์•ก์…˜์˜ ์ด๋ฆ„์œผ๋กœ ์‚ฌ์šฉํ•  ์งง์€ id.

์„ ํƒ์ ์œผ๋กœ:

  • ์„ ํƒ๋œ/์„ ํƒ๋˜์ง€ ์•Š์€ ๋ฆฌ์•ก์…˜์„ ์œ„ํ•œ ๋ณ„๋„์˜ ์ด๋ฏธ์ง€๋ฅผ ์ •์˜ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ๋ฆฌ์•ก์…˜ ์ค‘ ํ•˜๋‚˜ ์œ„์— ๋งˆ์šฐ์Šค๋ฅผ ์˜ฌ๋ ธ์„ ๋•Œ ๋ฆฌ์•ก์…˜ํ•œ ์‚ฌ์šฉ์ž ๋ชฉ๋ก์„ ํ‘œ์‹œํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ๊ฒฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ํŽ˜์ด์ง€ ๋ฆฌ์•ก์…˜ ์ฝ”๋“œ ์˜ˆ์ œ
Copy CopyRun External Link
1
2<script src="https://cdn.fastcomments.com/js/embed-v2.min.js"></script>
3<div id="page-reacts-example"></div>
4<script>
5 window.FastCommentsUI(document.getElementById('page-reacts-example'), {
6 tenantId: 'demo',
7 pageReactConfig: {
8 showUsers: true,
9 reacts: [
10 {id: 'droll', src: 'https://docs.fastcomments.com/images/emojis/droll.png'},
11 {id: 'he', src: 'https://docs.fastcomments.com/images/emojis/heart-eyes.png'},
12 {id: 'laugh', src: 'https://docs.fastcomments.com/images/emojis/laugh.png'},
13 {id: 'puke', src: 'https://docs.fastcomments.com/images/emojis/puke.png', selectedSrc: 'https://docs.fastcomments.com/images/emojis/puke-bw.png' },
14 {id: 'rofl', src: 'https://docs.fastcomments.com/images/emojis/rofl.png' },
15 ]
16 }
17 });
18</script>
19

React, Angular ๋“ฑ์˜ ํ”„๋ก ํŠธ์—”๋“œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋Œ€ํ•œ ๊ตฌ์„ฑ๋„ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.


ํ”Œ๋กœํŒ… ์ข‹์•„์š” ์œ„์ ฏ Internal Link

ํ”Œ๋กœํŒ… ์ข‹์•„์š” ์œ„์ ฏ์€ ์ข‹์•„์š” ๋ฐ ๋Œ“๊ธ€ ์ˆ˜๊ฐ€ ํ‘œ์‹œ๋œ ์ƒ์ž๋ฅผ ํ™”๋ฉด ์˜ค๋ฅธ์ชฝ ํ•˜๋‹จ์— ๋„์›Œ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ์ด ํŽ˜์ด์ง€์—์„œ ์‹ค์ œ๋กœ ์ž‘๋™ํ•˜๋Š” ๋ชจ์Šต์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!

์‚ฌ์šฉ์ž๋Š” ํ•˜ํŠธ๋ฅผ ํด๋ฆญํ•˜์—ฌ ํŽ˜์ด์ง€์— ์ข‹์•„์š”๋ฅผ ๋ˆ„๋ฅผ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์‚ฌ์šฉ์ž๊ฐ€ ์ข‹์•„์š”๋ฅผ ๋ˆ„๋ฅธ ํŽ˜์ด์ง€๋ฅผ ๊ธฐ์–ตํ•ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์‚ฌ์šฉ์ž๊ฐ€ fastcomments.com์— ๋กœ๊ทธ์ธ๋˜์–ด ์žˆ๋‹ค๋ฉด, ์ด๋Š” ๊ทธ๋“ค์˜ ๊ณ„์ •๊ณผ ์—ฐ๊ฒฐ๋˜์–ด ํ•œ ํŽ˜์ด์ง€์— ์—ฌ๋Ÿฌ ๋ฒˆ ์ข‹์•„์š”๋ฅผ ๋ˆ„๋ฅด๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.

๋˜ํ•œ ์‚ฌ์šฉ์ž์˜ ๋ธŒ๋ผ์šฐ์ € ๋‹คํฌ ๋ชจ๋“œ ์„ ํ˜ธ๋„๋ฅผ ์ž๋™์œผ๋กœ ๊ฐ์ง€ํ•˜์—ฌ ์›ํ•˜๋ฉด ์Šคํ‚จ์„ ๋‹คํฌ ๋ฒ„์ „์œผ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.

์„ค์น˜ - ๋ฐ”๋‹๋ผ JS Internal Link

์„ค์น˜๋Š” ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค:

ํ”Œ๋กœํŒ… ์ข‹์•„์š” ์ฝ”๋“œ ์˜ˆ์ œ
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-page-likes-floating.min.js"></script>
3<div id="fastcomments-page-likes-floating"></div>
4<script>
5 window.FastCommentsEmbedPageLikesFloating(document.getElementById('fastcomments-page-likes-floating'), {
6 tenantId: 'demo'
7 });
8</script>
9

์ƒ์„ฑ์ž์˜ ํƒ€์ž… ์‹œ๊ทธ๋‹ˆ์ฒ˜๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

๊ตฌ์„ฑ
Copy Copy
1
2/**
3 *
4 * @param {HTMLElement} targetElement
5 * @param config
6 * @property {string} tenantId
7 * @property {string} urlId - ํŽ˜์ด์ง€/๊ธฐ์‚ฌ ID๋ฅผ ์„ค์ •ํ•˜๋ ค๋ฉด ์ด๋ฅผ ๋ณ€๊ฒฝํ•˜์„ธ์š”. ๊ธฐ๋ณธ์ ์œผ๋กœ ํŽ˜์ด์ง€ URL์ž…๋‹ˆ๋‹ค.
8 * @property {() => void} [onOpenComments]
9 * @property {object} [sso]
10 * @constructor
11 */
12

์ด๋Š” ์ธ์ฆ์„ ์œ„ํ•ด ๋ฐ˜์‘(์ข‹์•„์š” ๋“ฑ)์„ ์‚ฌ์šฉ์ž์˜ ๊ณ„์ •์— ์—ฐ๊ฒฐํ•˜๋Š” SSO๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

ํ˜„์žฌ๋Š” VanillaJS๋งŒ ์ง€์›๋ฉ๋‹ˆ๋‹ค. ์ด ์œ„์ ฏ์„ ๋‹น์‚ฌ์˜ ํด๋ผ์ด์–ธํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ค‘ ํ•˜๋‚˜์— ์ถ”๊ฐ€ํ•˜๊ธธ ์›ํ•˜์‹œ๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”!

๋น„๋™๊ธฐ ๋ฒ„์ „

ํ”Œ๋กœํŒ… ์ข‹์•„์š” ์ฝ”๋“œ ๋น„๋™๊ธฐ ์˜ˆ์ œ
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-page-likes-floating.min.js?v=2" async></script>
3<div id="fastcomments-page-likes-floating"></div>
4<script>
5 (function () {
6 function tryLoad() {
7 if (window.FastCommentsEmbedPageLikesFloating) {
8 window.FastCommentsEmbedPageLikesFloating(document.getElementById('fastcomments-page-likes-floating'), {
9 tenantId: 'demo'
10 });
11 } else {
12 setTimeout(tryLoad, 50);
13 }
14 }
15
16 tryLoad();
17 })();
18</script>
19

SSO ์‚ฌ์šฉ

๋ณด์•ˆ SSO(Secure SSO) ๋˜๋Š” ๊ฐ„๋‹จํ•œ SSO(Simple SSO) ํŽ˜์ด๋กœ๋“œ๋„ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

ํ”Œ๋กœํŒ… ์ข‹์•„์š” ๋ณด์•ˆ SSO ์ฝ”๋“œ ์˜ˆ์ œ
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-page-likes-floating.min.js"></script>
3<div id="fastcomments-page-likes-floating"></div>
4<script>
5 window.FastCommentsEmbedPageLikesFloating(document.getElementById('fastcomments-page-likes-floating'), {
6 tenantId: 'demo',
7 sso // sso ๊ฐ์ฒด ์ „๋‹ฌ
8 });
9</script>
10
ํ”Œ๋กœํŒ… ์ข‹์•„์š” ๊ฐ„๋‹จํ•œ SSO ์ฝ”๋“œ ์˜ˆ์ œ
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-page-likes-floating.min.js"></script>
3<div id="fastcomments-page-likes-floating"></div>
4<script>
5 window.FastCommentsEmbedPageLikesFloating(document.getElementById('fastcomments-page-likes-floating'), {
6 tenantId: 'demo',
7 simpleSSO: {
8 id: 'some-user-id',
9 username: 'some username',
10 email: 'some@email.com',
11 }
12 });
13</script>
14

์„ค์น˜ - ์›Œ๋“œํ”„๋ ˆ์Šค Internal Link

WordPress์—์„œ๋Š” WPCode์™€ ๊ฐ™์€ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜ํ•˜๊ณ  ๋‹ค์Œ HTML ์Šค๋‹ˆํŽซ์„ ๋ธ”๋กœ๊ทธ ํ•˜๋‹จ(footer)์— ์ถ”๊ฐ€ํ•˜๋ฉด ์ด ๊ธฐ๋Šฅ์„ ํ™œ์„ฑํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

WordPress์šฉ ํ”Œ๋กœํŒ… ์ข‹์•„์š” ์ฝ”๋“œ
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-page-likes-floating.min.js" async></script>
3<div id="fastcomments-page-likes-floating"></div>
4<script>
5 (function () {
6 function tryLoad() {
7 if (window.FastCommentsEmbedPageLikesFloating) {
8 const articles = document.getElementsByTagName('article');
9 if (!articles.length) {
10 return console.warn('Article not found to show fastcomments likes.');
11 }
12 window.FastCommentsEmbedPageLikesFloating(document.getElementById('fastcomments-page-likes-floating'), {
13 tenantId: '-VuPDR12d-v_',
14 urlId: articles[0].id.replace('post-', '')
15 });
16 } else {
17 setTimeout(tryLoad, 50);
18 }
19 }
20
21 tryLoad();
22 })();
23</script>
24