private static string privacyToString(EventPrivacy ep)
 {
     switch (ep)
     {
         case EventPrivacy.OPEN:
             return "OPEN";
         case EventPrivacy.CLOSED:
             return "CLOSED";
         case EventPrivacy.SECRET:
             return "SECRET";
     }
     return "OPEN";
 }
Ejemplo n.º 2
0
        private static string privacyToString(EventPrivacy ep)
        {
            switch (ep)
            {
            case EventPrivacy.OPEN:
                return("OPEN");

            case EventPrivacy.CLOSED:
                return("CLOSED");

            case EventPrivacy.SECRET:
                return("SECRET");
            }
            return("OPEN");
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name">Name of event</param>
        /// <param name="description">Description</param>
        /// <param name="startTime">Start Time, UNIX format= 2012-06-14T12:22:23</param>
        /// <param name="endTime">End Time, not needde</param>
        /// <param name="location">Location</param>
        /// <param name="privacy">Privacy type</param>
        public void CreateEvent(string name, string description, string startTime, string endTime, string location, EventPrivacy privacy)
        {
            RFBClient = new FacebookClient(FBAuthenticationService.AccessToken);
            RFBClient.PostCompleted += new EventHandler<FacebookApiEventArgs>(RFBClient_PostCompleted);


            RFBClient.PostAsync(FetchString, new
            {
                name = name,
                start_time = startTime,
                end_time = endTime,
                description = description,
                location = location,
                privacy_type = privacyToString(privacy)
            });
        }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="name">Name of event</param>
        /// <param name="description">Description</param>
        /// <param name="startTime">Start Time, UNIX format= 2012-06-14T12:22:23</param>
        /// <param name="endTime">End Time, not needde</param>
        /// <param name="location">Location</param>
        /// <param name="privacy">Privacy type</param>
        public void CreateEvent(string name, string description, string startTime, string endTime, string location, EventPrivacy privacy)
        {
            RFBClient = new FacebookClient(FBAuthenticationService.AccessToken);
            RFBClient.PostCompleted += new EventHandler <FacebookApiEventArgs>(RFBClient_PostCompleted);


            RFBClient.PostAsync(FetchString, new
            {
                name         = name,
                start_time   = startTime,
                end_time     = endTime,
                description  = description,
                location     = location,
                privacy_type = privacyToString(privacy)
            });
        }