Commit 04fc58e5 authored by adcpm's avatar adcpm

Add follow / unfollow examples

parent 361a172d
......@@ -34,8 +34,51 @@
username, // Author
permlink, // Permlink
'', // Title
'This is a test!', // Body,
{ tags: ['test'], app: `steemjs/examples` }, // Json Metadata
'This is a test!', // Body
{ tags: ['test'], app: 'steemjs/examples' }, // Json Metadata
function(err, result) {
console.log(err, result);
}
);
/** Follow an user */
var follower = username; // Your username
var following = 'steemjs'; // User to follow
var json = JSON.stringify(
['follow', {
follower: follower,
following: following,
what: ['blog']
}]
);
steem.broadcast.customJson(
postingWif,
[], // Required_auths
[follower], // Required Posting Auths
'follow', // Id
json, //
function(err, result) {
console.log(err, result);
}
);
/** Unfollow an user */
var json = JSON.stringify(
['follow', {
follower: follower,
following: following,
what: []
}]
);
steem.broadcast.customJson(
postingWif,
[], // Required_auths
[follower], // Required Posting Auths
'follow', // Id
json, //
function(err, result) {
console.log(err, result);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment