You are viewing a single comment's thread from:
RE: TUTORIAL - Beginner friendly - Build your first steem bot in Javascript - 30minutes
For this particular version of js file can you post the code for post comments?
steem.broadcast.comment(ACCOUNT_WIF, parentAuthor, parentPermlink, ACCOUNT_NAME, The above code doesn't seem to work and the version specific changes are not documented well enough I think.
var parentAuthor = 'author1';
var parentPermlink = 'permlink;
var commentPermlink = steem.formatter.commentPermlink(parentAuthor, parentPermlink);
var postTitle = WELCOME_COMMENT_TITLE;
var postBody = WELCOME_COMMENT_BODY;
commentPermlink, postTitle, postBody,
{"tags":["tag1"]},
function(err, result) {
console.log(result);
});
Hey @gokulnk, can you be a little more clear so I can help you out?
The code you have given in your sample works perfectly.
I was just trying to build on it to add comments to a post.
I keep getting the following error.
"Expected version 128, instead got 149"
Please let me know if you were able to post comments through the code.
okay thanks for clarifying, it's 100% possible to send comments through code.
See this broadcast function - https://github.com/code-with-sam/steem-versary-bot/blob/master/bot.js#L183
notice the operations array on line 150 - https://github.com/code-with-sam/steem-versary-bot/blob/master/bot.js#L150
Looks like I am having issues with all the broadcast functions. stream functions are working fine though.
Let me know if we can discuss this in steemchat.
perhaps you are trying to do
steem.api.broadcast()
when it should besteem.broadcast()
?Also check you're not redefining
steem
anywhere?p.s post your full code as a gist!
For ACCOUNT_WIF I was using the actual password and not the posting key. After changing that it is working well. Since it was WIF related issue other calls were working and only those where WIF was involved were throwing the error.
I wish the message was little more verbose. It could have saved me a lot of time :P
Thanks for your inputs.