Skip to content
Snippets Groups Projects
Commit 361a172d authored by adcpm's avatar adcpm
Browse files

Add comment operation example

parent 4cad2860
No related branches found
No related tags found
No related merge requests found
...@@ -8,16 +8,38 @@ ...@@ -8,16 +8,38 @@
<script src="../dist/steem.min.js"></script> <script src="../dist/steem.min.js"></script>
<script> <script>
steem.broadcast.vote( /** Configure your account */
'5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg', // Posting WIF var username = 'guest123';
'guest123', // Voter username var postingWif = '5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg';
'firepower', // Author
'steemit-veni-vidi-vici-steemfest-2016-together-we-made-it-happen-thank-you-steemians', // Permlink /** Broadcast a vote */
10000, // Weight (10000 = 100%) steem.broadcast.vote(
function(err, result) { postingWif,
console.log(err, result); username, // Voter
} 'firepower', // Author
); 'steemit-veni-vidi-vici-steemfest-2016-together-we-made-it-happen-thank-you-steemians', // Permlink
10000, // Weight (10000 = 100%)
function(err, result) {
console.log(err, result);
}
);
/** Broadcast a comment */
var permlink = new Date().toISOString().replace(/[^a-zA-Z0-9]+/g, '').toLowerCase();
steem.broadcast.comment(
postingWif,
'siol', // Parent Author
'test', // Parent Permlink
username, // Author
permlink, // Permlink
'', // Title
'This is a test!', // Body,
{ tags: ['test'], app: `steemjs/examples` }, // Json Metadata
function(err, result) {
console.log(err, result);
}
);
</script> </script>
</body> </body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment