LinqToTwitter C# library erroring out when calling CreateFriendshipAsync - c#

I have been using LinqToTwitter's CreateFriendshipAsync method since quite a while, but all of a sudden it started to give the following error:
Invalid character '<' in input string
After doing authorization from Twitter when it returns to callback URL, using the returned AccessToken and AccessSecret to initialize the LinqToTwitter's TwitterContext method and twitter client. After that calling the CreateFriendshipAsync passing the twitter username to follow.
It was working fine but today it gave strange error.
Does anyone can tell me what could possibly go wrong.
I am using LinqToTwitter version 3.05, I have tried with latest version 3.1.2, but getting same error.

Related

TweetInvi and Filtered Streams

Just trying to do some basic testing of the Twitter API.
I've generate my keys/secrets and a bearer token, and been able to do simple Get/Create/Updates fine using the TweetInvi package.
However, I'm just totally stuck at how to get the Filtered Stream working to monitor for at mentions?
I have something like this:
var userClient = new TwitterClient(consumerKey, consumerSecret, accessToken, accessTokenSecret);
var stream = userClient.Streams.CreateFilteredStream();
stream.AddTrack("#AccountToFilterBy");
stream.MatchingTweetReceived += (sender, eventReceived) =>
{
// do some stuff
};
await stream.StartMatchingAnyConditionAsync();
This just won't work for me, I get a 403 error each time. I've tried just passing the consumer key/secret, using the client id key/secret (as I don't really know what it's for) and also added in the Bearer token as well to see if that helps, but just keep getting 403 error each time.
Has anyone got this working, was there a breaking change for TweetInvi as I can't find much info on it?
I am getting the same error, but I do not believe it is related to TweetInvi lib. For example, using Postman Twitter API when you create a tweet, it works. But it gives me same 403 error for for sampled or filtered stream using Postman Twitter API. I think it has to do with twitter permissions.

Intagram Api, redirect URI not matching?

Im making an app in Xamarin and using Xamarin.Auth to authenticate the API with instagram. The redirect url in my client and in my code is the exact same, yet I keep getting this error:
The website I am using to authenticate is:
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
I changed the client ID and redirect URI to my registered one.
My code looks like this:
I have no idea why I am getting this error, does anyone body know how I can fix this? Thanks

OneDrive get access token request case-sensitivity

I have a WinForms C# app using the OneDrive API. All was working up until last week when new token requests after authorizing the user started failing telling me that the 'code' parameter was invalid.
After reviewing my code, I noticed that routine that was extracting the authorization code from the authorize call back was using .ToLowerInvariant which resulted in the authorization code starting with a lower-case 'm'. When I removed the .ToLowerInvariant, the code started with an upper-case 'M' and the token request worked correctly.
Obviously I'm happy that my code is now working, but I'd like to try and understand why it suddenly started having problems.
Many thanks
James

Yandex forbidden error when I am not using it

I am getting the following error:
GET
http://bs.yandex.ru/informer/29840004/3_1_FFFFFFFF_EFEFEFFF_0_pageviews
403 (Forbidden)
The weird thing is that I am not using yandex and I don´t know from where I am calling to yandex. This is making me to fail some js code because it is just not executing anymore. I am using jquery-1.9.2.min.js and I search in the whole project but I didn´t found yandex anywhere

Foursquare (411) Length Required error with SharpSquare api

We've been using the Foursquare SharpSquare api to add checkins with success. We recently noticed that we're getting a "(411) Length Required" error. We get this error most of the time now, but once in a while it will post successfully. The general consensus to fix this error seem to be to add Content-Length=0 to the header, but i'm not sure if that's possible with SharpSquare. Any ideas?
It sounds like the SharpSquare api does not properly add a Content-length header. If this is not possible from using the SharpSquare API, you may need to update the SharpSquare source so this is performed correctly, or craft your own HTTP request without using the SharpSquare API.

Categories