Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Web Request Failed

$
0
0
Hi again,

Please send me the result of the following code.
try
{
    var applicationCredentials = CredentialsCreator.GenerateApplicationCredentials(Settings.GetString("TwitterConsumerKey"), Settings.GetString("TwitterConsumerSecret"));
    var newCredentials = CredentialsCreator.GetCredentialsFromCallbackURL(oContext.Request.Url.AbsoluteUri, applicationCredentials);
}
catch (TwitterException ex)
{
    var detailsToSendToLinvi = string.Format("status code : {0}\r\n", ex.StatusCode);
    detailsToSendToLinvi += string.Format("description : {0}\r\n", ex.TwitterDescription);

    if (ex.TwitterExceptionInfos != null&& ex.TwitterExceptionInfos.Count() > 0)
    {
        detailsToSendToLinvi += "--- DETAILS \r\n";

        foreach (var details in ex.TwitterExceptionInfos)
        {
            detailsToSendToLinvi += string.Format("{0} : {1}", details.Code, details.Message);
        }
    }

    // SEND ME THIS
    Console.WriteLine(detailsToSendToLinvi);
}
As a result of your request I will add a feature to add TwitterException to the ExceptionHandler and get the expected result from it.

Looking forward to hearing from you.
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>