Book Image

Node.js By Example

Book Image

Node.js By Example

Overview of this book

Table of Contents (18 chapters)
Node.js By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 9. Tagging, Sharing, and Liking

Chapter 8, Creating Pages and Events, was about creating pages and attaching events to them. We also made the posting of comments possible. In this part of the book, we will add three new features. Almost every social network contains some way to like a post. It is a nice way to rank the posts that you are interested in. Sharing is another popular process that comprises of posting an already existing post. Sometimes, we want to refer a post to some of our friends. In these cases, we tag people. These three functionalities will be implemented in this chapter. Here are the sections that will guide us through the development process:

  • Selecting friends and sending their IDs to the backend

  • Storing the tagged users and displaying them in the user's feed

  • Sharing a post

  • Liking posts and counting the number of likes

  • Showing the number of likes