Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The VeryTime,Stay informed and read the latest news today from The VeryTime, the definitive source.

Social Media Site Development - Tracking Followers

28
A web site is a web page or a collection of web pages.
When an account is created in a social networking site, a web site is allocated to the user which is possible to download using the normal URL format ending with /yourpersonalizedusername after the social media web site address.
So there are as many web sites as there are account holders in a social networking site.
After signing up in a social media site, the next thing is to find who to follow which is called friends in Facebook.
As soon as you get people to follow, you can connect to them through blogs (in form of comments posted or shared), chat rooms, and web mail in your allocated social media site.
A social media site separates the multiple allocated social media sites of the users into clearly different segments of activities of social connections.
The core part of social networking site is the tracking of all the events, information, and activities concerning a user in his allocated social networking site within the social media site.
For instance, tracking people he is following, his followers, and presenting the right and appropriate information about them all in his allocated social media site without any mix up like presenting comments by wrong followers and wrong photographs.
When the social media site is able to track everything concerning a user synchronously, his allocated social media site will present all the information relevant to him upon signing in into his site.
The question now is this," How will a user allocated social media site within a social media site be able to track everything concerning a user synchronously and correctly?" I will suggest the BASIC way to go about it which will work and I will use blogs and photograph processing in a user allocated social media site for illustration.
Before making my illustration, let me make some clarifications about the usage of some words in this article to enable better understanding of the article.
When you find someone you want to follow and the process is completed, you are following that person.
You are the follower.
When someone wants who to follow and he wants to follow you and the process is completed, that person is following you.
You are the person followed.
You create in the database tables for the main account, followership, comments, and photograph (profile picture in this case which will be appearing beside your comments in the blog).
The main account will contain columns for at least primary key designated as userID, names, account number, username and password.
It will contain records of all the account holders (users) of the entire social networking site and information they submitted on signing up.
A unique account number will be generated dynamically on signing up.
When a user signs in, the script will use his username and password to search the main account table and retrieve his primary key number, names, and account number.
These will enable the retrieval of the information concerning him like the comments of his followers for display in his allocated social media site.
I will explain how this will be done very soon.
The followership table will have fields for at least names, primary key column of the main account table which is the foreign key of a follower (UserID) and the account number of the person that is being followed designated as person_followed_acct_no.
The records in the table will be generated as follows- When a user signs in into his allocated social media site and finds who to follow (friend in Facebook), the script with the aid of SQL SELECT statement will retrieve the user's primary key number from the main account table.
It will also retrieve the names and the account number of the person he wants to follow.
All of them will be inserted into the followership table as one record with the user's primary key number stored in the UserID column and the account number of the person he is following stored in the person_followed_acct_no column.
The user's primary key number will be foreign key in the UserID column and a relationship is created between the main account table and the followership table.
As more and more users find who to follow, the table grows.
Since the table contains column UserID for foreign keys representing the primary key numbers of the followers, and columns for the names and unique account numbers of those they are following (person_followed_acct_no), a search statement making use of SQL SELECT statement with the appropriate WHERE clause will enable the tracking of the persons that a particular user is following and the persons following him.
As soon as he signs in, the script retrieves his primary key number from the main account table and uses it to search the followership table to retrieve the identity of those he is following.
For example: SELECT * FROM followership WHERE UserID='id_no' where id_no is the variable holding his primary key number retrieved from the main account table.
UserID is the foreign key field.
In the same vein, the script will use his unique account number also retrieved as soon as he signed in to search the followership to retrieve those following him.
For example: SELECT * FROM followership WHERE person_followed_acct_no='acct_no' where acct_no is the variable holding his account number from the main account table and person_followed_acct_no is the account number field of the person that is being followed by a follower.
Once the script has identified those a user is following and those following him, then it is possible to track and present on the platform of his allocated social media web site the comments (and associated pictures) that the user shared or posted and that of those following him as it is found in Facebook WALL which is a blog.
Let us see how this can be actualized.
You create tables for comments (News in Facebook) and photograph.
The comments table will contain fields for at least the comment posting date, the text of the comment, and a column (UserID) for the primary key values of the main account table which also becomes foreign key.
The photograph table will contain fields for at least the photograph name and the foreign key column (UserID) that will contain values obtained from the primary key values of the main account table.
When a comment is shared or posted by a user in his allocated social media site, it will be inserted into comments table along with his primary key number in the main account table and the posting date.
The same goes for an uploaded photograph.
When his profile picture is uploaded, his primary key number and his photograph name are inserted into the photograph table.
On signing in into his account and the script has identified those he is following and those following him as explained earlier on, their foreign keys obtained from processing the search result of the last two SQL SELECT statements above will be used to search the comments and photograph tables and we will use id_followed as the variable holding the foreign keys of those a user is following and id_follower as the variable holding the foreign keys of those following a user.
For example: SELECT * FROM comments WHERE UserID='id_followed' SELECT * FROM comments WHERE UserID='id_follower' SELECT * FROM photograph WHERE UserID='id_followed' SELECT * FROM photograph WHERE UserID='id_follower' These statements will pull out comments and photograph name of a user as a follower and that of those he is following and present them in the blog of his allocated social networking site after matching the photograph name with the stored image in the folder provided.
In the final analysis, what you will have is something like a chain pulling so many related things into a user allocated social media site and presenting them according to the web design structure of the site.
To present only the most recent comments in a user's social media site, you add an additional clause to the SQL SELECT statement so that the script can select comments within a specified date limit.
Other items like updatable profile and account setting that are normally provided in social networking sites are presented in forms and processed by SQL UPDATE statements on submission.
The capability of a social networking site to track all the information about a user synchronously depends heavily on the effective use of relationships between tables in a database and efforts should be made to get them right.
Some of my articles below will be found useful for more information-
  1. The Development of Blog and Database Table Relationship
  2. Processing of Uploaded Image Along With Associated Text Data after Submission
Copyright reserved.
Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.