 [CC0 Creative Commons Pixabay](https://pixabay.com) Hi everyone today we explain about the possibility to use the Steem Api to broadcast a comment on a specific user post. I use the comment on the @steemrepo project because our curators choose good quality posts and can make the upvote/comment on a post directly by our discord server:  We use discord because we take this two var used on the script: >Author: the post author Permlink: the link of the post author <h2>Requirements</h2> Installing the libraries: >sudo apt-get install nodejs sudo apt-get install npm npm install steem --save <h2>Write the Code</h2> ``` var steem = require("steem"); var wifkey = youprivatepostingkey; var author = postauthor; var permlink = thelinkoftheposttocommenton; var author1 = theuserwewillusetocomment; steem.broadcast.comment( wifkey, author, // Parent Author permlink, // Parent Permlink author1, // Author steem.formatter.commentPermlink(author, permlink), '', // Title 'The comment you wanna add on a post' , // Body, { tags: ['test'], app: `steemjs/examples` }, // Json Metadata function(err, result) { console.log(err, result); } ); ``` <h2>Explain the variables</h2> To comment on a specific user post we use the steem.js functions called **"steem.broadcast.comment"** **"steem.formatter.commentPermlink"** - wifkey = the private posting key of the users we are using to comment - author = called Parent Author is the author of the post we are commenting on - permlink = is exactly the url we are commenting on - Author1 = is the username related to the wifkey we are using to comment Let me do an example: Imagine you are @yanosh01 and you want to comment this @steemrepo post: https://steemit.com/steemrepo/@steemrepo/steemrepo-rewarding-undervalued-content-creators it will be: - wifkey = the private posting key of yanosh01 - author = steemrepo - permlink = steemrepo-rewarding-undervalued-content-creators - Author1 = yanosh01 --------------- <h3>If you like what i'm doing, please upvote me as your Witness</h3> https://steemit.com/~witnesses 
author | yanosh01 |
---|---|
permlink | how-to-broadcast-a-comment-to-a-specific-user-link |
category | steemrepo |
json_metadata | {"tags":["steemrepo","development","steemdev","help","minnow"],"users":["steemrepo","yanosh01"],"image":["https://steemitimages.com/DQmVsxpdtrcou2s2bAWGQ2JkkPrEjSXARoBvEWR32YDTNdo/new-york-1071162_1280.jpg","https://steemitimages.com/DQmfX9LTHR7Xt2sNLVr73zwmqDZgJkhmbUfeUPTdtUchQhG/Immagine.png","https://steemitimages.com/DQmbVGHGMJNhUpmqUTeDvvMGaevzaNFdib24Sa9XhVS48XM/witness.gif"],"links":["https://pixabay.com","https://steemit.com/steemrepo/@steemrepo/steemrepo-rewarding-undervalued-content-creators","https://steemit.com/~witnesses"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-05-15 22:33:48 |
last_update | 2018-05-20 10:16:15 |
depth | 0 |
children | 4 |
last_payout | 2018-05-22 22:33:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 15.744 HBD |
curator_payout_value | 4.397 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,454 |
author_reputation | 12,371,240,230,142 |
root_title | "How to Broadcast a Comment to a specific user link" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 55,900,675 |
net_rshares | 4,107,781,391,932 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
novacadian | 0 | 6,441,144,456 | 49% | ||
inarix03 | 0 | 277,058,485 | 10% | ||
angelgarz | 0 | 14,476,306,950 | 100% | ||
dexpartacus | 0 | 2,459,302,856 | 7% | ||
rensoul17 | 0 | 4,922,633,928 | 55.55% | ||
funnystuff | 0 | 143,008,330 | 1% | ||
horpey | 0 | 474,440,106 | 2.5% | ||
primetimesports | 0 | 2,764,684,650 | 10% | ||
yanosh01 | 0 | 7,458,276,833 | 100% | ||
postpromoter | 0 | 3,989,601,609,139 | 3.23% | ||
fortir | 0 | 885,891,211 | 100% | ||
lotteryfy | 0 | 1,177,412,594 | 100% | ||
abderrahimlafifi | 0 | 148,120,823 | 0.2% | ||
jezzica | 0 | 270,588,401 | 100% | ||
nelkeljdm | 0 | 8,200,989,366 | 10% | ||
girolamomarotta | 0 | 5,000,078,459 | 20% | ||
voiceoff | 0 | 10,957,588,284 | 35% | ||
gamsam | 0 | 614,296,559 | 0.75% | ||
nilasha | 0 | 237,903,921 | 100% | ||
syahril9 | 0 | 279,282,267 | 50% | ||
poetsunit | 0 | 8,866,818,853 | 50% | ||
bahagia9 | 0 | 220,257,387 | 50% | ||
obulunmaz | 0 | 5,223,850,791 | 100% | ||
astrobot | 0 | 886,471,854 | 100% | ||
minnowhelpme | 0 | 4,473,379,625 | 100% | ||
yanbot | 0 | 610,971,008 | 100% | ||
bitius | 0 | 862,690,873 | 100% | ||
steemitresources | 0 | 1,285,674,067 | 50% | ||
steemrepo | 0 | 28,154,562,506 | 50% | ||
alijewel | 0 | 406,097,350 | 100% |
You got a 3.23% upvote from @postpromoter courtesy of @yanosh01! Want to promote your posts too? Check out the [Steem Bot Tracker website](https://steembottracker.com) for more info. If you would like to support the development of @postpromoter and the bot tracker please [vote for @yabapmatt for witness!](https://v2.steemconnect.com/sign/account-witness-vote?witness=yabapmatt&approve=1)
author | postpromoter |
---|---|
permlink | re-yanosh01-how-to-broadcast-a-comment-to-a-specific-user-link-20180515t232455078z |
category | steemrepo |
json_metadata | {"app":"postpromoter/2.0.0"} |
created | 2018-05-15 23:24:54 |
last_update | 2018-05-15 23:24:54 |
depth | 1 |
children | 0 |
last_payout | 2018-05-22 23:24:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 391 |
author_reputation | 12,722,616,650,811 |
root_title | "How to Broadcast a Comment to a specific user link" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 55,906,197 |
net_rshares | 0 |
I just found your account today. I appreciate these short tutorials. They are useful to a new developer like me. I am working towards building multiple projects connected to the Steem blockchain.
author | steemfunder |
---|---|
permlink | re-yanosh01-how-to-broadcast-a-comment-to-a-specific-user-link-20180515t224632614z |
category | steemrepo |
json_metadata | {"tags":["steemrepo"],"app":"steemit/0.1"} |
created | 2018-05-15 22:46:33 |
last_update | 2018-05-15 22:46:33 |
depth | 1 |
children | 2 |
last_payout | 2018-05-22 22:46:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.033 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 195 |
author_reputation | 124,324,143,886 |
root_title | "How to Broadcast a Comment to a specific user link" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 55,902,127 |
net_rshares | 7,305,286,539 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
yanosh01 | 0 | 7,305,286,539 | 100% |
It's a pleasure. My focus is on javascript, so if you need any help you can contact me on @steemrepo Discord server or on Developers Discord server. Feel free to ask me whatever you need!!!
author | yanosh01 |
---|---|
permlink | re-steemfunder-re-yanosh01-how-to-broadcast-a-comment-to-a-specific-user-link-20180515t225229320z |
category | steemrepo |
json_metadata | {"tags":["steemrepo"],"users":["steemrepo"],"app":"steemit/0.1"} |
created | 2018-05-15 22:52:33 |
last_update | 2018-05-15 22:52:33 |
depth | 2 |
children | 1 |
last_payout | 2018-05-22 22:52:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 189 |
author_reputation | 12,371,240,230,142 |
root_title | "How to Broadcast a Comment to a specific user link" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 55,902,769 |
net_rshares | 0 |
I will definitely reach out. My main account is @nikema here and on discord. Thank you so much!
author | steemfunder |
---|---|
permlink | re-yanosh01-re-steemfunder-re-yanosh01-how-to-broadcast-a-comment-to-a-specific-user-link-20180515t230037920z |
category | steemrepo |
json_metadata | {"tags":["steemrepo"],"users":["nikema"],"app":"steemit/0.1"} |
created | 2018-05-15 23:00:39 |
last_update | 2018-05-15 23:00:39 |
depth | 3 |
children | 0 |
last_payout | 2018-05-22 23:00:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 95 |
author_reputation | 124,324,143,886 |
root_title | "How to Broadcast a Comment to a specific user link" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 55,903,592 |
net_rshares | 0 |