Set commentOptions with Steemconnect in javascript

in #steemcodeit7 years ago (edited)

useful to someone. Set commentOptions with Steemconnect.


api.broadcast([["comment_option",{ "author":result.author, "permlink":result.permlink, "max_accepted_payout":'1000000.000 SBD', "percent_steem_dollars":10000, "allow_votes":true, "allow_curation_rewards":true, "extensions":[ [0, { "beneficiaries": [{"account": "STEEMUSER", "weight": 5000}] } ] ] }]], function(err, res) {
                              console.log(err, res);
});

Enjoy!