Пример #1
0
 public static void PostToOwnWall(PromotionInstance a)
 {
     FacebookClient fc = new FacebookClient(FacebookWebContext.Current.AccessToken);
     dynamic parameters = PopulateParametersForEvent(a.Promotion.Event);
     parameters.actions = new
     {
         name = "View on Popr.ly",
         link = "http://popr.ly/Promotion/Invitation/?id=" + a.Id.ToString()
     };
     SetPrivacy(parameters, a.Promotion.Event.Privacy);
     dynamic result = fc.Post("me/feed", parameters);
 }
Пример #2
0
        //public static Permission GetPermissions(InvitationResponse ir, ConnectionType connection)
        //{
        //    var p = new Permission(ir);
        //    if (connection.HasFlag(ConnectionType.Owner)
        //        // connection.HasFlag(ConnectionType.ActivityOwner) -- why do we have activity owner deleting the response for?
        //        )
        //    {
        //        p.value |= PermissionEnum.Delete;
        //    }
        //    return p;
        //}
        public static Permission GetPermissions(PromotionInstance i, ConnectionType connection)
        {
            var p = new Permission(i);

            if (connection.HasFlag(ConnectionType.Owner)
                // connection.HasFlag(ConnectionType.ActivityOwner) -- why do we have activity owner deleting the response for?
                )
            {
                p.value |= PermissionEnum.Delete;
            }

            return p;
        }