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

Created Unassigned: GetUserTimeline returns 403 Forbidden [2004]

$
0
0
When I call GetUserTimeline on a user object which I passed a token to, the Twitter API returns a 403 error. Other calls such as GetFriends and GetFavorites work, however.

Here's the main method I'm running in ExampleInvi:

```
IToken token = new Token(
ConfigurationManager.AppSettings["token_AccessToken"],
ConfigurationManager.AppSettings["token_AccessTokenSecret"],
ConfigurationManager.AppSettings["token_ConsumerKey"],
ConfigurationManager.AppSettings["token_ConsumerSecret"]);

TokenSingleton.Token = token;

User ladygaga = new User("ladygaga",token);
foreach (Tweet t in ladygaga.GetUserTimeline())
{
Console.WriteLine(t.Text);
}
```

And the result:

```
System.Net.WebException occurred
HResult=-2146233079
Message=The remote server returned an error: (403) Forbidden.
Source=System
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at oAuthConnection.OAuthToken.ExecuteQueryWithSpecificParameters(String url, HttpMethod httpMethod, WebExceptionHandlingDelegate exceptionHandler, IEnumerable`1 headers) in c:\Users\cheeser12\Documents\code\TweetInvi\Tweetinvi - Source Code - 0.8.3.23\oAuthConnection\OAuthToken.cs:line 133
InnerException:

```

Viewing all articles
Browse latest Browse all 4126

Trending Articles



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