Implementing Following Feature on Steem

following

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.

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
17 Comments