Ejemplo n.º 1
0
        private notification_data GetList(DateTime?start_time, bool include_read, bool isAsync, GetListCallback callback, Object state)
        {
            var parameterList = new Dictionary <string, string>
            {
                { "method", "facebook.notifications.GetList" },
            };

            Utilities.AddOptionalParameter(parameterList, "start_time", DateHelper.ConvertDateToDouble(start_time));
            Utilities.AddParameter(parameterList, "include_read", include_read);

            if (isAsync)
            {
                SendRequestAsync(parameterList, new FacebookCallCompleted <notification_data>(callback), state);
                return(null);
            }

            return(SendRequest <notifications_GetList_response>(parameterList));
        }
        private notification_data GetList(DateTime? start_time, bool include_read, bool isAsync, GetListCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string>
                                    {
                                        {"method", "facebook.notifications.GetList"},
                                    };
            Utilities.AddOptionalParameter(parameterList, "start_time", DateHelper.ConvertDateToDouble(start_time));
            Utilities.AddParameter(parameterList, "include_read", include_read);

            if (isAsync)
            {
                SendRequestAsync(parameterList, new FacebookCallCompleted<notification_data>(callback), state);
                return null;
            }

            return SendRequest<notifications_GetList_response>(parameterList);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// This method gets all the current session user's notifications, as well as data for the applications that generated those notifications. It is a wrapper around the notification and application FQL tables; you can achieve more fine-grained control by using those two FQL tables in conjunction with the fql.multiquery API call.
 /// Applications must pass a valid session key.
 /// </summary>
 /// <param name="start_time">Indicates the earliest time to return a notification. This equates to the updated_time field in the notification FQL table. If not specified, this call returns all available notifications. </param>
 /// <param name="include_read">Indicates whether to include notifications that have already been read. By default, notifications a user has read are not included. </param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>
 /// <returns>alerts and apps.</returns>
 public void GetListAsync(DateTime?start_time, bool include_read, GetListCallback callback, Object state)
 {
     GetList(start_time, include_read, true, callback, state);
 }
 /// <summary>
 /// This method gets all the current session user's notifications, as well as data for the applications that generated those notifications. It is a wrapper around the notification and application FQL tables; you can achieve more fine-grained control by using those two FQL tables in conjunction with the fql.multiquery API call. 
 /// Applications must pass a valid session key. 
 /// </summary>
 /// <param name="start_time">Indicates the earliest time to return a notification. This equates to the updated_time field in the notification FQL table. If not specified, this call returns all available notifications. </param>
 /// <param name="include_read">Indicates whether to include notifications that have already been read. By default, notifications a user has read are not included. </param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>alerts and apps.</returns>
 public void GetListAsync(DateTime? start_time, bool include_read, GetListCallback callback, Object state)
 {
     GetList(start_time, include_read, true, callback, state);
 }