Example #1
0
        private bool MarkRead(List <long> notification_ids, bool isAsync, MarkReadCallback callback, Object state)
        {
            var parameterList = new Dictionary <string, string>
            {
                { "method", "facebook.notifications.markRead" },
                { "notification_ids", StringHelper.ConvertToCommaSeparated <long>(notification_ids) }
            };

            if (isAsync)
            {
                SendRequestAsync <notifications_markRead_response, bool>(parameterList, new FacebookCallCompleted <bool>(callback), state);
                return(true);
            }

            var response = SendRequest <notifications_markRead_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey));

            return(response == null ? false : response.TypedValue);
        }
        private bool MarkRead(List<long> notification_ids, bool isAsync, MarkReadCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string>
                                    {
                                        {"method", "facebook.notifications.markRead"},
                                        {"notification_ids", StringHelper.ConvertToCommaSeparated<long>(notification_ids)}
                                    };

            if (isAsync)
            {
                SendRequestAsync<notifications_markRead_response, bool>(parameterList, new FacebookCallCompleted<bool>(callback), state);
                return true;
            }

            var response = SendRequest<notifications_markRead_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey));
            return response == null ? false : response.TypedValue;
        }
Example #3
0
 /// <summary>
 /// This method marks one or more notifications as read. You return the notifications by calling notifications.getList or querying the notification FQL table.
 /// Applications must pass a valid session key, and can only mark the notifications of the current session user.
 /// </summary>
 /// <param name="notification_ids">List of notification ids</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 MarkReadAsync(List <long> notification_ids, MarkReadCallback callback, Object state)
 {
     MarkRead(notification_ids, true, callback, state);
 }
 /// <summary>
 /// This method marks one or more notifications as read. You return the notifications by calling notifications.getList or querying the notification FQL table. 
 /// Applications must pass a valid session key, and can only mark the notifications of the current session user. 
 /// </summary>
 /// <param name="notification_ids">List of notification ids</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 MarkReadAsync(List<long> notification_ids, MarkReadCallback callback, Object state)
 {
     MarkRead(notification_ids, true, callback, state);
 }