0

i want to retrieve tweets from twitter using specific hashtags. i am using tweetinvi for this purpose.but i am getting an error outer exception:

The type initializer for 'Tweetinvi.TwitterCredentials' threw an exception.
Inner exception:
{"Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)":"System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes"}
 i am using autofac 3.4.
kindly point out what am i doing wrong?

     TwitterCredentials.SetCredentials("useraccesstoken",
                "useraccessecret",
                "consumerKey",
                "consumerSecret");
              var searchParameterSearch.GenerateTweetSearchParameter("#pakvsSA");
           searchParameter.SetGeoCode(-122.398720, 37.781157, 1,DistanceMeasure.Miles);
           searchParameter.Lang = Language.English;
           searchParameter.SearchType = SearchResultType.Popular;
           searchParameter.MaximumNumberOfResults = 100;
           searchParameter.Until = new DateTime(2015, 12, 3);
           searchParameter.SinceId = 399616835892781056;
           searchParameter.MaxId = 405001488843284480;
           var tweets = Search.SearchTweets(searchParameter);
Lucifer
  • 29,392
  • 25
  • 90
  • 143
Azka Gilani
  • 45
  • 1
  • 8

1 Answers1

0

So it looks like there are some .dll required by Tweetinvi (Sytem.Core) that are missing.

I would strongly advise using nuget to install Tweetinvi as a package as it will automatically install and reference all required dll.

https://www.nuget.org/packages/TweetinviAPI/

user2465083
  • 595
  • 3
  • 12