public async Task <ActionResult> GetStatisticsByLikers(string userName, string sortType = "ascending")
        {
            // Check the userName parameter. If it is empty, then set the name of the current user.
            if (String.IsNullOrEmpty(userName))
            {
                userName = System.Web.HttpContext.Current.Session["UserName"].ToString();
            }
            string userPK = _instaApi.GetPrimaryKeyByUsername(userName);
            // Get user's posts
            List <InstagramPost> userPosts = await _instaApi.GetUserPostsByPrimaryKeyAsync(userPK);

            // Create a dictionary for storing likers (key - user, value - number of likes)
            Dictionary <User, int> Likers = new Dictionary <User, int>();

            // Check the likers of each post and fill out our dictionary
            foreach (var post in userPosts)
            {
                if (Likers.Count == 0)
                {
                    foreach (var liker in post.Commenters)
                    {
                        Likers.Add(liker, 1);
                    }
                }

                foreach (var liker in post.Commenters)
                {
                    var key = Likers.Where(c => c.Key.InstagramPK == liker.InstagramPK).FirstOrDefault();

                    if (key.Equals(default(KeyValuePair <User, int>)))
                    {
                        Likers.Add(liker, 1);
                    }
                    else
                    {
                        Likers[key.Key]++;
                    }
                }
            }
            // return a partial view with a sorted dictionary, depending on the parameter sortType
            if (sortType == "descending")
            {
                if (Likers.Count != 0)
                {
                    return(PartialView("_GetStatisticsByLikers", Likers.OrderBy(x => x.Value).ToDictionary(x => x.Key, x => x.Value)));
                }
                else
                {
                    return(PartialView("_GetStatisticsByLikers"));
                }
            }
            else
            {
                if (Likers.Count != 0)
                {
                    return(PartialView("_GetStatisticsByLikers", Likers.OrderByDescending(x => x.Value).ToDictionary(x => x.Key, x => x.Value)));
                }
                else
                {
                    return(PartialView("_GetStatisticsByLikers"));
                }
            }
        }