Exemplo n.º 1
0
        private void follow()
        {
            if (Provider.User.IsAnonim())
            {
                return;
            }

            SocialAPI.FollowUser(Provider.User.Id, context.Request["user"], null);

            context.Response.Write(new Result {
                Data = true
            }.ToJSON());
        }
Exemplo n.º 2
0
        private void followContacts()
        {
            if (Provider.User.IsAnonim())
            {
                return;
            }

            string[] emails = Provider.Request.Form["emails"].SplitWithTrim('&');
            foreach (string emailParts in emails)
            {
                try
                {
                    var email = emailParts.SplitWithTrim('=')[1].Replace("%40", "@");
                    SocialAPI.FollowUser(Provider.User.Id, null, email);
                }
                catch { }
            }
            Provider.Response.Write("ok");
        }