![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512066899/i4dumpo8sz6a6yx2qlcp.png) <br> A little bird made me notice that I started explaining more complicate features of SteemJs although I haven't shown how to vote yet. It is a very easy process knowing which you can design for example a voting slider for minnows (This is how SteemPlus started ;) ). Anyways, let's get to it and as usual, check the [documentation](https://github.com/steemit/steem-js/tree/master/doc#votes) ~~~~ steem.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) { console.log(err, result); }); ~~~~ Simply use this as the following: - ````wif```` is the private posting key, that you can find under the Permissions tab of your wallet. Click on show the private key and copy paste it here. - ````voter```` is the account corresponding to that wif key, the person voting. - ````author```` is the author of the blog (or comment) you wish to vote for. - ````permlink```` : be careful here, it's not the entire url but only the last part of it, after the last ````/```` - ````weight````, the weight goes to two decimals so multiply your percentage by 100 : 99.99%= 9999. This corresponds to the percentage at which you are actually voting. Okay, that was a bit too easy so let's also see how to get specifically the votes for a post. Use it in the same manner than above, and it will return the list of votes, their authors, weights and r_shares. ~~~~ steem.api.getActiveVotes(author, permlink, function(err, result) { console.log(err, result); }); ~~~~ You can also get the last upvotes from a specific account by using this function: ~~~~ steem.api.getAccountVotes(voter, function(err, result) { console.log(err, result); }); ~~~~ ````voter```` stands from the account you wish to look out. It will return the list of the last votes. That was a quick episode. Stay tuned for next one ;) Hope this helps! @stoodkev <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@stoodkev/steemjs-for-dummies-10-voting">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
post_id | 19,142,982 | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
author | stoodkev | ||||||||||||||||||||||||||||||||||||||||||||||||
permlink | steemjs-for-dummies-10-voting | ||||||||||||||||||||||||||||||||||||||||||||||||
category | utopian-io | ||||||||||||||||||||||||||||||||||||||||||||||||
json_metadata | "{"type": "tutorials", "repository": {"id": 63857882, "watchers": 179, "events_url": "https://api.github.com/repos/steemit/steem-js/events", "forks": 67, "name": "steem-js", "issues_url": "https://api.github.com/repos/steemit/steem-js/issues{/number}", "trees_url": "https://api.github.com/repos/steemit/steem-js/git/trees{/sha}", "fork": false, "git_url": "git://github.com/steemit/steem-js.git", "assignees_url": "https://api.github.com/repos/steemit/steem-js/assignees{/user}", "size": 11336, "owner": {"id": 17434692, "following_url": "https://api.github.com/users/steemit/following{/other_user}", "starred_url": "https://api.github.com/users/steemit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/steemit/subscriptions", "repos_url": "https://api.github.com/users/steemit/repos", "login": "steemit", "gists_url": "https://api.github.com/users/steemit/gists{/gist_id}", "followers_url": "https://api.github.com/users/steemit/followers", "received_events_url": "https://api.github.com/users/steemit/received_events", "type": "Organization", "avatar_url": "https://avatars3.githubusercontent.com/u/17434692?v=4", "site_admin": false, "organizations_url": "https://api.github.com/users/steemit/orgs", "gravatar_id": "", "events_url": "https://api.github.com/users/steemit/events{/privacy}", "url": "https://api.github.com/users/steemit", "html_url": "https://github.com/steemit"}, "forks_count": 67, "git_refs_url": "https://api.github.com/repos/steemit/steem-js/git/refs{/sha}", "blobs_url": "https://api.github.com/repos/steemit/steem-js/git/blobs{/sha}", "pushed_at": "2017-11-29T16:10:41Z", "watchers_count": 179, "teams_url": "https://api.github.com/repos/steemit/steem-js/teams", "comments_url": "https://api.github.com/repos/steemit/steem-js/comments{/number}", "archived": false, "svn_url": "https://github.com/steemit/steem-js", "merges_url": "https://api.github.com/repos/steemit/steem-js/merges", "subscribers_url": "https://api.github.com/repos/steemit/steem-js/subscribers", "issue_events_url": "https://api.github.com/repos/steemit/steem-js/issues/events{/number}", "stargazers_url": "https://api.github.com/repos/steemit/steem-js/stargazers", "mirror_url": null, "statuses_url": "https://api.github.com/repos/steemit/steem-js/statuses/{sha}", "has_projects": true, "milestones_url": "https://api.github.com/repos/steemit/steem-js/milestones{/number}", "description": "Steem.js the official JavaScript library for Steem blockchain", "keys_url": "https://api.github.com/repos/steemit/steem-js/keys{/key_id}", "open_issues": 39, "compare_url": "https://api.github.com/repos/steemit/steem-js/compare/{base}...{head}", "ssh_url": "git@github.com:steemit/steem-js.git", "license": {"name": "MIT License", "key": "mit", "url": "https://api.github.com/licenses/mit", "spdx_id": "MIT"}, "html_url": "https://github.com/steemit/steem-js", "commits_url": "https://api.github.com/repos/steemit/steem-js/commits{/sha}", "open_issues_count": 39, "stargazers_count": 179, "branches_url": "https://api.github.com/repos/steemit/steem-js/branches{/branch}", "full_name": "steemit/steem-js", "forks_url": "https://api.github.com/repos/steemit/steem-js/forks", "score": 102.26825, "deployments_url": "https://api.github.com/repos/steemit/steem-js/deployments", "contributors_url": "https://api.github.com/repos/steemit/steem-js/contributors", "homepage": "https://www.npmjs.com/package/steem", "contents_url": "https://api.github.com/repos/steemit/steem-js/contents/{+path}", "has_downloads": true, "collaborators_url": "https://api.github.com/repos/steemit/steem-js/collaborators{/collaborator}", "created_at": "2016-07-21T09:54:16Z", "git_commits_url": "https://api.github.com/repos/steemit/steem-js/git/commits{/sha}", "releases_url": "https://api.github.com/repos/steemit/steem-js/releases{/id}", "private": false, "pulls_url": "https://api.github.com/repos/steemit/steem-js/pulls{/number}", "git_tags_url": "https://api.github.com/repos/steemit/steem-js/git/tags{/sha}", "notifications_url": "https://api.github.com/repos/steemit/steem-js/notifications{?since,all,participating}", "language": "JavaScript", "updated_at": "2017-11-29T06:01:02Z", "has_wiki": false, "downloads_url": "https://api.github.com/repos/steemit/steem-js/downloads", "hooks_url": "https://api.github.com/repos/steemit/steem-js/hooks", "languages_url": "https://api.github.com/repos/steemit/steem-js/languages", "default_branch": "master", "labels_url": "https://api.github.com/repos/steemit/steem-js/labels{/name}", "url": "https://api.github.com/repos/steemit/steem-js", "has_pages": false, "tags_url": "https://api.github.com/repos/steemit/steem-js/tags", "clone_url": "https://github.com/steemit/steem-js.git", "archive_url": "https://api.github.com/repos/steemit/steem-js/{archive_format}{/ref}", "has_issues": true, "issue_comment_url": "https://api.github.com/repos/steemit/steem-js/issues/comments{/number}", "subscription_url": "https://api.github.com/repos/steemit/steem-js/subscription"}, "pullRequests": [], "format": "markdown", "image": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512066899/i4dumpo8sz6a6yx2qlcp.png"], "links": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512066899/i4dumpo8sz6a6yx2qlcp.png", "https://github.com/steemit/steem-js/tree/master/doc#votes"], "app": "utopian/1.0.0", "platform": "github", "tags": ["utopian-io", "steemdev", "opensource", "news", "steemjs"], "community": "utopian", "users": ["stoodkev"]}" | ||||||||||||||||||||||||||||||||||||||||||||||||
created | 2017-11-30 18:51:51 | ||||||||||||||||||||||||||||||||||||||||||||||||
last_update | 2017-11-30 18:51:51 | ||||||||||||||||||||||||||||||||||||||||||||||||
depth | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
children | 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
net_rshares | 15,035,744,312,836 | ||||||||||||||||||||||||||||||||||||||||||||||||
last_payout | 2017-12-07 18:51:51 | ||||||||||||||||||||||||||||||||||||||||||||||||
cashout_time | 1969-12-31 23:59:59 | ||||||||||||||||||||||||||||||||||||||||||||||||
total_payout_value | 29.311 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
curator_payout_value | 10.244 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
pending_payout_value | 0.000 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
promoted | 0.000 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
body_length | 2,117 | ||||||||||||||||||||||||||||||||||||||||||||||||
author_reputation | 89,353,405,873,727 | ||||||||||||||||||||||||||||||||||||||||||||||||
root_title | "SteemJs for Dummies #10: Voting" | ||||||||||||||||||||||||||||||||||||||||||||||||
beneficiaries |
| ||||||||||||||||||||||||||||||||||||||||||||||||
max_accepted_payout | 1,000,000.000 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
percent_steem_dollars | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
bitland | 0 | 4,927,105,178 | 20% | ||
dez1337 | 0 | 15,186,657,329 | 30% | ||
defango | 0 | 34,598,045,446 | 11.11% | ||
carterx7 | 0 | 161,174,546,408 | 100% | ||
askari | 0 | 11,825,673,454 | 85.55% | ||
firesteem | 0 | 4,569,750,449 | 85.55% | ||
c0ff33a | 0 | 62,672,702,927 | 100% | ||
frankk | 0 | 788,701,575 | 100% | ||
szokerobert | 0 | 9,134,119,738 | 100% | ||
scrooger | 0 | 18,388,728,865 | 20% | ||
jassennessaj | 0 | 18,228,491,823 | 20% | ||
flauwy | 0 | 419,937,909,423 | 100% | ||
overkillcoin | 0 | 61,340,903,935 | 20% | ||
drakos | 0 | 108,514,435,329 | 30% | ||
omar-hesham | 0 | 44,365,513,319 | 100% | ||
reko | 0 | 62,192,941,239 | 22% | ||
fugetaboutit | 0 | 14,475,328,869 | 85.55% | ||
britcoins | 0 | 2,702,403,443 | 100% | ||
st3llar | 0 | 723,793,166 | 5% | ||
coffeedrinker51 | 0 | 8,501,954,782 | 20% | ||
runicar | 0 | 33,450,001,619 | 100% | ||
jrswab | 0 | 423,794,455 | 2% | ||
flerze | 0 | 636,648,120 | 100% | ||
catwomanteresa | 0 | 12,874,084,832 | 40% | ||
katteasis | 0 | 10,183,152,362 | 50% | ||
hag228 | 0 | 11,365,119,892 | 100% | ||
nainaztengra | 0 | 29,074,062,041 | 100% | ||
munawar1235 | 0 | 235,603,104,081 | 85.55% | ||
sarmizegetusa | 0 | 27,224,983,125 | 100% | ||
cryptowarrior88 | 0 | 3,429,798,481 | 15% | ||
stoodkev | 0 | 215,412,639,727 | 100% | ||
dumbasian | 0 | 60,705,347,199 | 100% | ||
crokkon | 0 | 15,780,619,477 | 85.55% | ||
accelerator | 0 | 16,057,111,894 | 30% | ||
sarafol | 0 | 596,846,651 | 100% | ||
palou | 0 | 597,163,917 | 100% | ||
podekev | 0 | 597,044,934 | 100% | ||
vlemon | 0 | 186,970,793,693 | 20% | ||
janebaba | 0 | 596,767,329 | 100% | ||
polblitz | 0 | 596,767,329 | 100% | ||
malilala | 0 | 596,767,329 | 100% | ||
lecaillon | 0 | 596,767,329 | 100% | ||
sylvia-lns | 0 | 596,767,329 | 100% | ||
followmenow | 0 | 596,767,329 | 100% | ||
lanslot | 0 | 596,727,672 | 100% | ||
jamesbarraclough | 0 | 1,901,206,131,762 | 10% | ||
dollarman | 0 | 918,051,656 | 100% | ||
espoem | 0 | 40,085,729,349 | 80% | ||
jasonmunapasee | 0 | 3,008,280,005 | 85.55% | ||
yabapmatt | 0 | 506,547,104,635 | 100% | ||
littleboy | 0 | 0 | 0% | ||
donateforcancer | 0 | 173,104,712 | 20% | ||
pitboy | 0 | 631,554,575 | 100% | ||
m-san | 0 | 2,355,023,964 | 100% | ||
blockgators | 0 | 392,850,548,641 | 85.55% | ||
jonesteemit | 0 | 4,934,426,649 | 100% | ||
steemit-bot | 0 | 2,897,871,014 | 100% | ||
mochi-mochi | 0 | 550,418,816 | 100% | ||
sobiakanwal | 0 | 240,168,151,010 | 100% | ||
pcma1425 | 0 | 542,705,990 | 100% | ||
mahmoodhassan | 0 | 673,646,847 | 100% | ||
emmamartinme | 0 | 959,975,953 | 100% | ||
utopian-io | 0 | 9,962,898,813,238 | 8% | ||
moscato | 0 | 302,578,932 | 85.55% | ||
anupbose | 0 | 1,214,504,341 | 100% | ||
emrebeyler | 0 | 6,381,185,197 | 20% | ||
cryptoeth | 0 | 1,050,313,713 | 100% | ||
sohan12 | 0 | 1,075,129,686 | 100% | ||
may0201 | 0 | 1,009,315,810 | 100% | ||
syfulcomet | 0 | 993,848,979 | 100% | ||
itsmikechu | 0 | 10,061,522,302 | 100% | ||
apukb | 0 | 1,404,617,389 | 100% | ||
redwanmiazee10 | 0 | 911,197,522 | 100% | ||
arslanq | 0 | 597,684,670 | 100% | ||
bizznewshttps | 0 | 506,801,935 | 100% | ||
tobibur.rahman | 0 | 426,132,185 | 100% | ||
jezzica | 0 | 874,262,114 | 100% | ||
olivaw | 0 | 1,115,021,558 | 100% | ||
asifali975 | 0 | 584,698,447 | 100% | ||
mycryptoverse | 0 | 9,759,344,583 | 100% | ||
brrass | 0 | 1,073,497,612 | 100% | ||
ahmed4 | 0 | 829,784,304 | 100% | ||
droopy | 0 | 849,308,925 | 100% | ||
utopy | 0 | 2,113,856,321 | 1% | ||
laythefavorite | 0 | 696,314,831 | 100% | ||
cryptomeme | 0 | 1,102,497,821 | 100% | ||
blickyer | 0 | 0 | 100% |
Thank you for the contribution. It has been approved. You can contact us on [Discord](https://discord.gg/UCvqCsx). **[[utopian-moderator]](https://utopian.io/moderators)**
post_id | 19,152,722 |
---|---|
author | emrebeyler |
permlink | re-stoodkev-steemjs-for-dummies-10-voting-20171130t211726603z |
category | utopian-io |
json_metadata | "{"app": "busy/1.0.0", "community": "busy", "tags": ["utopian-io"]}" |
created | 2017-11-30 21:17:27 |
last_update | 2017-11-30 21:17:27 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2017-12-07 21:17:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 172 |
author_reputation | 319,480,565,467,431 |
root_title | "SteemJs for Dummies #10: Voting" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
### Hey @stoodkev I am @utopian-io. I have just upvoted you! #### Achievements - WOW WOW WOW People loved what you did here. GREAT JOB! - You have less than 500 followers. Just gave you a gift to help you succeed! - You are generating more rewards than average for this category. Super!;) - Seems like you contribute quite often. AMAZING! #### Community-Driven Witness! I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER! - <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a> - <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a> - Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a> [![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses) **Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
post_id | 19,252,065 |
---|---|
author | utopian-io |
permlink | re-stoodkev-steemjs-for-dummies-10-voting-20171202t020806893z |
category | utopian-io |
json_metadata | "{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}" |
created | 2017-12-02 02:08:06 |
last_update | 2017-12-02 02:08:06 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2017-12-09 02:08:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,216 |
author_reputation | 152,913,012,544,965 |
root_title | "SteemJs for Dummies #10: Voting" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |