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

Commented Unassigned: 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: lepert **

It turns out my issue was that Twitter does NOT allow the SAME Media to be posted Twice to a user's feed ? We were hoping to add a branding image to the tweets. If someone knows something more about this, please share.

BUT... this did reveal an issue in the code above... once the 403 exception occurs the catch handler gets the exception. In the catch handler... the Event is NOT released... hanging the thread. I added this to my code until the fix comes...

catch (Exception ex)
{
Debug.WriteLine(ex);
// JLH :: clear the event if error
manualResetEvent.Set();
}


Viewing all articles
Browse latest Browse all 4126

Trending Articles



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