private void OnRemoveFavouriteException(object sender, RemoveFavouriteExceptionEventArgs e)
        {
            Dispatcher.BeginInvoke(() =>
            {
                if (e.PhotoId != PhotoSource.ResourceId)
                    return;

                ProgressView.Visibility = Visibility.Collapsed;
                StatusLabel.Text = e.Message;
                doneButton.IsEnabled = true;
            });
        }
        public void RemovePhotoFromFavouriteAsync(string photoId)
        {
            string timestamp = DateTimeUtils.GetTimestamp();
            string nonce = Guid.NewGuid().ToString().Replace("-", null);

            Dictionary<string, string> paramDict = new Dictionary<string, string>();
            paramDict["method"] = "flickr.favorites.remove";
            paramDict["format"] = "json";
            paramDict["nojsoncallback"] = "1";
            paramDict["oauth_consumer_key"] = consumerKey;
            paramDict["oauth_nonce"] = nonce;
            paramDict["oauth_signature_method"] = "HMAC-SHA1";
            paramDict["oauth_timestamp"] = timestamp;
            paramDict["oauth_token"] = AccessToken;
            paramDict["oauth_version"] = "1.0";
            paramDict["photo_id"] = photoId;

            string signature = OAuthCalculateSignature("POST", "https://api.flickr.com/services/rest/", paramDict, AccessTokenSecret);
            paramDict["oauth_signature"] = signature;

            DispatchPostRequest("POST", "https://api.flickr.com/services/rest/", paramDict,
                (response) =>
                {
                    bool success = true;
                    string errorMessage = "";

                    try
                    {
                        JObject json = JObject.Parse(response);
                        string status = json["stat"].ToString();
                        if (status != "ok")
                        {
                            success = false;
                            errorMessage = json["message"].ToString();
                        }
                    }
                    catch (Exception e)
                    {
                        Debug.WriteLine(e.Message);

                        success = false;
                    }

                    if (!success)
                    {
                        RemoveFavouriteExceptionEventArgs exceptionArgs = new RemoveFavouriteExceptionEventArgs();
                        exceptionArgs.PhotoId = photoId;
                        exceptionArgs.Message = errorMessage;
                        RemovePhotoFromFavouriteException.DispatchEvent(this, exceptionArgs);
                    }
                    else
                    {
                        RemoveFavouriteEventArgs args = new RemoveFavouriteEventArgs();
                        args.PhotoId = photoId;
                        RemovePhotoFromFavourite.DispatchEvent(this, args);
                    }


                }, (ex) =>
                {
                    RemoveFavouriteExceptionEventArgs exceptionArgs = new RemoveFavouriteExceptionEventArgs();
                    exceptionArgs.PhotoId = photoId;
                    exceptionArgs.Message = "Unknown network error";
                    RemovePhotoFromFavouriteException.DispatchEvent(this, exceptionArgs);
                });
        }