create account

Implementing Following Feature on Steem by dantheman

View this thread on: hive.blogpeakd.comecency.com
· @dantheman ·
$27.09
Implementing Following Feature on Steem
![following](https://todaymade.com/blog/wp-content/uploads/2011/03/1300896465_Follow-me.png)

One of the most frequently requested features for Steem is the ability for one account to follow another account. This post presents a proposed Standard for specifying which accounts you would like to follow on the blockchain.

Following can be divided into two independent parts: specifying who and what you would like to follow and taking that information to produce a feed. 

## Specifying who you want to Follow

Steem supports an operation known as `custom_json_operation` and it can be used to add arbitrary authenticated JSON data to the blockchain.  This is what the transaction would look like to have the account **steemit** follow the account **steem**. 

```
 {
  "ref_block_num": 55458,
  "ref_block_prefix": 2523838490,
  "expiration": "2016-06-03T17:58:33",
  "operations": [[
      "custom_json",{
        "required_posting_auths": [ "steemit" ],
        "id": "follow",
        "json": "{\"follower\":\"steemit\",\"following\":\"steem\",\"what\":[\"posts\"]}"
      }
    ]
  ],
  "signatures": [   "2015ff1ee...a4"  ]
}
```

Examples of things you can follow include: `posts`, `comments`, `votes`, or `ignore`.  

## Producing a User Feed from Follow Preferences

The simple algorithm is to fetch all posts from everyone you are following and sort them by date posted.  This would produce a feed similar to the current http://steemit.com/created except it would exclude posts from anyone you are not following.  

## The Code

The plugin that implements tracking of followers / following can be found here:
https://github.com/steemit/steem/tree/develop/libraries/plugins/follow

The next step is to update steemit.com to show you the posts of the people you are following (and/or hide the posts from people you are ignoring).   

## Feedback Wanted

If you have any opinions on what the standard operation should look like let me know.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 23 others
👎  ,
properties (23)
authordantheman
permlinkimplementing-following-feature-on-steem
categorysteem
json_metadata{"tags":["steem","steemit","following"],"image":["https://todaymade.com/blog/wp-content/uploads/2011/03/1300896465_Follow-me.png"]}
created2016-06-03 18:44:03
last_update2016-06-03 18:44:03
depth0
children17
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value13.548 HBD
curator_payout_value13.545 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,947
author_reputation240,292,002,602,347
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,834
net_rshares16,537,397,041,234
author_curate_reward""
vote details (89)
@arhag · (edited)
$0.91
I have lots of opinions but I will save most of them for my post on the "streems" standard.

My main criticism is that I don't like the idea of forcing this data to be on the blockchain. I'm okay with optionally putting account following data on the blockchain, not necessarily for generating feeds for yourself in the client, but as a signal to let other people know who are the interesting people they think are worth following. But I think the feed definitions should ultimately be private.

Well, you could still share the feed definition if you want. In fact, maybe the feed definition could even be put into a custom JSON operation to easily share it with other people with a simple link. But it shouldn't be necessary to put it on the blockchain for steemit to provide the feed of posts/comments to the end user.

Steemit already can generate a feed of posts/comments with any of the supported sort orders for any chosen tag. Steemit could easily support doing the same except for any chosen user. The client could then merge all of these feeds into one, while filtering out redundant posts/comments as well as any satisfying some predicate on the metadata of the post/comment (author, tags, net_rshares, depth, last_update). To save network bandwidth, the actual content would not be provided in all the individual feeds (just the metadata including permlink). The client could then concurrently request from steemit.com servers the content for each post/comment that makes it into the final merged/filtered feed (and perhaps even grab it from cache if available and not invalidated).
👍  
properties (23)
authorarhag
permlinkre-dantheman-implementing-following-feature-on-steem-20160604t044417711z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-04 04:44:18
last_update2016-06-04 04:49:00
depth1
children1
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.454 HBD
curator_payout_value0.454 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,592
author_reputation52,490,827,205,383
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,068
net_rshares1,921,995,375,877
author_curate_reward""
vote details (1)
@samupaha ·
I was thinking also that there is no need to put this on blockchain. This could work better as a UI feature in Steemit.
properties (22)
authorsamupaha
permlinkre-arhag-re-dantheman-implementing-following-feature-on-steem-20160604t132342824z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-04 13:23:42
last_update2016-06-04 13:23:42
depth2
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length119
author_reputation43,637,433,899,367
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,317
net_rshares0
@ash ·
I presume there will be follow buttons?
👍  , ,
properties (23)
authorash
permlinkre-dantheman-implementing-following-feature-on-steem-20160603t184927847z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 18:49:27
last_update2016-06-03 18:49:27
depth1
children2
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length39
author_reputation286,803,743,324,398
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,837
net_rshares8,414,525,765
author_curate_reward""
vote details (3)
@dantheman ·
Yes, we are working on that next.
properties (22)
authordantheman
permlinkre-ash-re-dantheman-implementing-following-feature-on-steem-20160603t185608614z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 18:56:09
last_update2016-06-03 18:56:09
depth2
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length33
author_reputation240,292,002,602,347
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,845
net_rshares0
@tuck-fheman ·
I'd hit it.
👍  ,
properties (23)
authortuck-fheman
permlinkre-ash-re-dantheman-implementing-following-feature-on-steem-20160603t185314411z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 18:53:21
last_update2016-06-03 18:53:21
depth2
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11
author_reputation345,778,813,561,569
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,841
net_rshares52,086,531,413
author_curate_reward""
vote details (2)
@fkn ·
Do you think there will be the same follow bots that plague twitter? What are the negative implications of adding follow buttons? People are vane, there are many fake accounts on twitter, which are used for fake follow bots. Do you think its a possibility here?
properties (22)
authorfkn
permlinkre-dantheman-implementing-following-feature-on-steem-20160604t004411180z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-04 00:44:09
last_update2016-06-04 00:44:09
depth1
children2
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length261
author_reputation4,932,761,786,114
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,967
net_rshares0
@jsc ·
What does a fake follow bot do?  I imagine people will tag those account with ignore...
properties (22)
authorjsc
permlinkre-fkn-re-dantheman-implementing-following-feature-on-steem-20160604t131006208z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-04 13:10:06
last_update2016-06-04 13:10:06
depth2
children1
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length87
author_reputation5,003,156,605,879
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,311
net_rshares0
@fkn · (edited)
Fake follower bots are used by companies that sell followers. You purchase fake followers from company they follow you with thousands of fake accounts. 

Why would someone ignore a fake account when it gives others the impression they have more followers?
👍  
properties (23)
authorfkn
permlinkre-jsc-re-fkn-re-dantheman-implementing-following-feature-on-steem-20160606t010630123z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-06 01:06:27
last_update2016-06-06 01:06:57
depth3
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length255
author_reputation4,932,761,786,114
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,562
net_rshares1,187,531,826
author_curate_reward""
vote details (1)
@gardenlady ·
I'm confused (sorry, not a techy!  just a gardener!).  Do I need to use a code to follow certain people or topics?  In future, will there just be some user-friendly buttons to click?  That would work for me :-)
properties (22)
authorgardenlady
permlinkre-dantheman-implementing-following-feature-on-steem-20160603t185823829z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 18:58:18
last_update2016-06-03 18:58:18
depth1
children1
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length210
author_reputation38,110,543,680,290
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,848
net_rshares0
@dantheman ·
$0.04
Yes, you will just click a button.  This post is more about the protocol (what happens when you click the button).  This is what 3rd parties need to integrate with and use the information available.  I mostly put this together to document the operation for other developers who are working on the button ;)
👍  ,
properties (23)
authordantheman
permlinkre-gardenlady-re-dantheman-implementing-following-feature-on-steem-20160603t190153337z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 19:01:54
last_update2016-06-03 19:01:54
depth2
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.020 HBD
curator_payout_value0.020 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length306
author_reputation240,292,002,602,347
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,853
net_rshares124,097,054,683
author_curate_reward""
vote details (2)
@iamsohail ·
Awesome! I have Followed You!
properties (22)
authoriamsohail
permlinkre-dantheman-implementing-following-feature-on-steem-20180108t031757629z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-01-08 03:18:00
last_update2018-01-08 03:18:00
depth1
children0
last_payout2018-01-15 03:18:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length29
author_reputation37,585,899,543
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id27,902,574
net_rshares0
@jabberw0cky ·
I would like see a 'like' icon do I confined podts I want to re-read without having to search for them.
properties (22)
authorjabberw0cky
permlinkre-dantheman-implementing-following-feature-on-steem-20160614t200042174z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-14 20:00:42
last_update2016-06-14 20:00:42
depth1
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length103
author_reputation2,488,807,039,602
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id32,224
net_rshares0
@jsc ·
Thank you for this feature!  I'm really happy to see both sides: ignore and follow.  This will make for some interesting data mining.  For example, maybe I could trust ignores made by another account (they might be exceptional at flagging disinformation for example).

It was a bit confusing to see the follower account twice so I looked into it.  It looks like `required_posting_auths` is used to track the bandwidth (does this account have enough bandwidth to post this operation) and is not necessarily the `follower`.   I see in the plugin, the `follower` must sign the operation, so obviously we don't want other people telling us who to follow.  These will probably always be the same so one signature is required.

For the operation to be valid, it looks like we need an empty array for `required_auths`...
properties (22)
authorjsc
permlinkre-dantheman-implementing-following-feature-on-steem-20160604t130659983z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-04 13:07:00
last_update2016-06-04 13:07:00
depth1
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length813
author_reputation5,003,156,605,879
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,309
net_rshares0
@nkdk ·
$32.87
maybe i'ts a good idea if the people can follow tags or categories too
👍  , , , , , ,
properties (23)
authornkdk
permlinkre-dantheman-implementing-following-feature-on-steem-20160603t192029161z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 19:21:09
last_update2016-06-03 19:21:09
depth1
children2
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value16.436 HBD
curator_payout_value16.435 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length70
author_reputation33,503,131,573,914
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,861
net_rshares18,436,035,426,550
author_curate_reward""
vote details (7)
@dantheman ·
Good idea!  The easiest way to do that with minimal modification is to make the "following" field of the format:

`@accountname`  or `#tagname`
properties (22)
authordantheman
permlinkre-nkdk-re-dantheman-implementing-following-feature-on-steem-20160603t192818487z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 19:28:18
last_update2016-06-03 19:28:18
depth2
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length143
author_reputation240,292,002,602,347
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,869
net_rshares0
@tuck-fheman ·
You must have been following our discussion on slack last night on "Mine old feature request that received zero payout and take credit for the idea yourself for profit!" Well done sir! =b

https://steemit.com/steemit-ideas/@tuck-fheman/watch-a-topic
👍  
properties (23)
authortuck-fheman
permlinkre-nkdk-re-dantheman-implementing-following-feature-on-steem-20160603t193103355z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 19:31:09
last_update2016-06-03 19:31:09
depth2
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length249
author_reputation345,778,813,561,569
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,871
net_rshares0
author_curate_reward""
vote details (1)
@smooth ·
I downvoted the post not because I disagree with the post or think it is a quality post but because I do not think that the interests of Steem are served by every platform or devteam update or request for community feedback pulling thousands of dollars from the reward pools that go to ordinary users. The reward consensus algorithm also disproportionately rewards these posts since they are the only thing that 100% of Steem users have in common (aside from being human, etc.).
properties (22)
authorsmooth
permlinkre-dantheman-implementing-following-feature-on-steem-20160617t025828800z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-17 02:58:30
last_update2016-06-17 02:58:30
depth1
children0
last_payout2016-08-13 07:10:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length478
author_reputation253,602,537,834,068
root_title"Implementing Following Feature on Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,855
net_rshares0