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

Commented Issue: ExecuteOperationWithCredentials and CreateTweetWithMedia :: 403 ? [2164]

$
0
0
I am able to PublishTweets without issue with the given access token and secret and consumer key combination under ExecuteOperationWithCredentials. But when I try and create a tweet with Media and Publish it.. this area in the execution on EndGetResponse returns with exception 403 Forbidden. Any suggestions on what is wrong. Like I said... I can PublishTweets fine with same credentials.

try
{
var response = request.EndGetResponse(a);
using (StreamReader streamReader = new StreamReader(response.GetResponseStream()))
{
result = streamReader.ReadToEnd();
manualResetEvent.Set();
}
}
catch (Exception ex)
{
Debug.WriteLine(ex);
}
Comments: ** Comment from web user: linvi **

Hi,

The fact that the library should not affect your project. It allow developers to use the same library (dll) for various platforms like Windows 8, Windows RT, Windows Phone, Mono, Xamarin Android...

I think the following methods could help you:

``` c#
// Throw WebExceptions so that you can manage them on your own
ExceptionHandler.SwallowWebExceptions = false;

// Notify you that an exception has been raised so that you can log them if needed
ExceptionHandler.WebExceptionReceived += (sender, args) =>
{
var exceptionDetails = args.Value;
};
```

Also please think about using Nuget so that you can easily upgrade the API with the incoming new features.

If you have any other question please feel free to ask on the forum. I usually reply at the end of my working day.

Regards,
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>