I learned how to resteem using steem-jssteemCreated with Sketch.

in #steem-js6 years ago (edited)

RTFM

The fucking manual shows only signatures without any explanation about the parameters (like Android ;)

Custom Json

steem.broadcast.customJson(wif, requiredAuths, requiredPostingAuths, id, json, function(err, result) {
  console.log(err, result);
});

https://github.com/steemit/steem-js/tree/master/doc#custom-json

Gladfully, the are many examples on the web and DuckDuckGo shown me the way.

Hello resteem

const steem = require("steem");

const account="your_username";
const wif=steem.auth.toWif(account,"your_password",'posting');

const author="freebot";
const permlink="i-learned-how-to-resteem-using-steem-js";

const json = JSON.stringify(['reblog', {
    account: account,
    author: author,
    permlink: permlink
}]);

steem.broadcast.customJson(wif, [], [account], 'follow', json, (err, result) => {
    console.log(err, result);
});

'follow' ...what is this thing doing here?

I could not have guessed it by reading the doc...

Sort:  

Thanks for the resteem @freebot!

Posted using Partiko iOS

You're welcome. I like your thoughts.
Free Julian Assange!

Congratulations @freebot! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 100 upvotes. Your next target is to reach 250 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

You can upvote this notification to help all Steem users. Learn how here!

Resteemed by @resteembot! Good Luck!
Check @resteembot's introduction post or the other great posts I already resteemed.

Congratulations!


This post has been granted a 100% upvote, courtesy to @freebot, from BlissFish!
Enjoy the Bliss!

Join us on Discord!
Upvote this post to help the minnows win a bigger upvote!

New_Intro.gif

This post is Powered by @superbot all the way from Planet Super Earth.

Follow @superbot First and then Transfer 0.100 STEEM/STEEM DOLLAR to @superbot & the URL in the
memo that you want Resteemed + get Upvoted & Followed By @superbot and 1 Partner Account.

Your post will Appear in the feed of 1300+ Followers :)

So don't waste any time ! Get More Followers and gain more Visibility With @superbot

#Note - Please don't send amount less than 0.100 Steem/Steem Dollar ,Also a post can only be resteemed once.

Thank you for using @superbot

If you would like to support this bot , Please don't forget to upvote this post :)
Stay Super !

This post was upvoted and resteemed by @resteemr!
Thank you for using @resteemr.


@resteemr is a low price resteem service.
Check what @resteemr can do for you. Introduction of resteemr.

You got a 100.00% upvote from @botcoin courtesy of @droida!

@freebot how can i use this resteem script i have 4000 followers and big group with steemians on facebook

What do you want to do? Resteem random posts from your followers?

You need the list of authors, take into account the recent posts of each author, draw a random post and resteem it.