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

Commented Unassigned: Streaming API issue (Might be multi-threading) [2666]

$
0
0
I just want to ask a question about a weird issue that I have been facing. I setup a filtered stream so I can be able to acquire hashtags, and then print out something whenever the hashtag has been posted on twitter. I use two hashtags as my trackers, one which is the actual hashtag, and another one which is a code. Example (#test, #te123). So every time I get those hashtags in a tweet, I reset the code part of the hashtag (#te123 becomes for example #te456), and then I would stop the old stream, create a new one, add the new trackers, and then start a new one in an async manner.

The issue is that it always triggers for the first time, but after that, it would sometimes trigger and sometimes not for some odd reason. Any advice on how to solve this issue ?

Thank you for the help.
Comments: ** Comment from web user: PierreJC **

Problem solved .. Sorry for the inconvenience. It was a problem happening in between the interaction of my console and windows form.


Commented Unassigned: Streaming API issue (Might be multi-threading) [2666]

$
0
0
I just want to ask a question about a weird issue that I have been facing. I setup a filtered stream so I can be able to acquire hashtags, and then print out something whenever the hashtag has been posted on twitter. I use two hashtags as my trackers, one which is the actual hashtag, and another one which is a code. Example (#test, #te123). So every time I get those hashtags in a tweet, I reset the code part of the hashtag (#te123 becomes for example #te456), and then I would stop the old stream, create a new one, add the new trackers, and then start a new one in an async manner.

The issue is that it always triggers for the first time, but after that, it would sometimes trigger and sometimes not for some odd reason. Any advice on how to solve this issue ?

Thank you for the help.
Comments: ** Comment from web user: linvi **

No problem.

Please remember that Tweetinvi has moved on github. So please try to open the issues on https://github.com/linvi/tweetinvi/issues.

Thanks,
Linvi

Released: Tweetinvi 0.9.11.0 (Mar 05, 2016)

$
0
0

Breaking Changes

This version contains breaking changes specially because of naming improvements :
  • LoggedUser => AuthenticatedUser.

The class and interface are now AuthenticatedUser andIAuthenticatedUser.
To get the authenticated user please do the same as before :

var authenticatedUser = User.GetAuthenticatedUser();
  • TokenRateLimits => CredentialsRateLimits
  • TokenRateLimit => EndpointRateLimits
  • Favourites => Favorites
  • IFilteredStream.MatchingTweetAndLocationReceived have been removed (see more).
  • Settings.ShowDebug does no longer exist as all the information it provided are now available in theTweetinviEvents.

Tweet

  • Updated TweetLength calculation to match the new Twitter calculation.
  • You now have access to the unretweet endpoint.

var success = = Tweet.UnRetweet(tweet);
// ORvar tweet = Tweet.GetTweet(...);
tweet.UnRetweet();
  • User.GetFavorites can now take optional parameters.

User.GetFavoritedTweets("tweetinviapi", new GetUserFavoritesParameters()
{
    MaximumNumberOfTweetsToRetrieve = 10,
    IncludeEntities = true,
    SinceId = 42,
    MaxId = 4242
});

Filtered Streams

The matching mechanism has been improved to analyze all the different tweet fields that are used by the Twitter Stream API to filter tweets.

MatchOn

FilteredStream now have a new MatchOn property that specify which fields need to be analyzed to match Tweets. In Tweetinvi <= 0.9.10.2, the matching process only considered theText property.

In this new version, Tweetinvi matches with ALL the fields by default (MatchOn.Everything).

// Match only on the Tweet Text or any of the entities of the tweet,
fs.MatchOn = MatchOn.TweetText | MatchOn.AllEntities; 

MatchingTweetReceived

MatchingTweetReceived event args now includes all the matching information that are used by Tweetinvi to detect if a Tweet is matching or not.

var tracks = args.MatchingTracks;
var followers = args.MatchingFollowers; // newvar locations = args.MatchingLocations; // new

The event args now also includes a new MatchOn property that let you know which fields of the Tweet have been used to match the tweet.

Therefore if args.MatchOn == MatchOn.UrlEntities it means that the tweet has been matched on a url but not via the text.

MatchingTweetAndLocationReceived

This event has been deleted because you can now access all the information in MatchingTweetReceived as explained above.

Rate Limits

TwitterQuery now includes 2 new fields that areQueryRateLimits and CredentialsRateLimits.
This can be quite useful when registering the TweetinviEvents.

Videos Upload

  • Videos are now automatically uploaded in chunks of 2 MB. This simplify the upload of videos > 5 MB.

Other improvements

  • Improved the models documentation.
  • Improved error handling.
  • UnBlockUser is now accessible from the AuthenticatedUser as well as the static User class.

var success = User.UnBlockUser("bidochon");
// ORvar authenticatedUser = User.GetAuthenticatedUser();
authenticatedUser.UnBlockUser("bidochon");
  • ITrends now includes the tweet_volume field/

Bug Fixes

  • Fixed potential deadlock when using tweetinvi async functions.
  • PublishTweet/Message failed when used with a mix of special characters.
  • Tweet.GetTweets correctly returns collection with a single matching element.

Created Release: Tweetinvi 0.9.11.0 (Mar 05, 2016)

$
0
0

Breaking Changes

This version contains breaking changes specially because of naming improvements :
  • LoggedUser => AuthenticatedUser.

The class and interface are now AuthenticatedUser and IAuthenticatedUser.
To get the authenticated user please do the same as before :

var authenticatedUser = User.GetAuthenticatedUser();
  • TokenRateLimits => CredentialsRateLimits
  • TokenRateLimit => EndpointRateLimits
  • Favourites => Favorites
  • IFilteredStream.MatchingTweetAndLocationReceived have been removed (see more).
  • Settings.ShowDebug does no longer exist as all the information it provided are now available in the TweetinviEvents.

Tweet

  • Updated TweetLength calculation to match the new Twitter calculation.
  • You now have access to the unretweet endpoint.

var success = = Tweet.UnRetweet(tweet);
// ORvar tweet = Tweet.GetTweet(...);
tweet.UnRetweet();
  • User.GetFavorites can now take optional parameters.

User.GetFavoritedTweets("tweetinviapi", new GetUserFavoritesParameters()
{
    MaximumNumberOfTweetsToRetrieve = 10,
    IncludeEntities = true,
    SinceId = 42,
    MaxId = 4242
});

Filtered Streams

The matching mechanism has been improved to analyze all the different tweet fields that are used by the Twitter Stream API to filter tweets.

MatchOn

FilteredStream now have a new MatchOn property that specify which fields need to be analyzed to match Tweets. In Tweetinvi <= 0.9.10.2, the matching process only considered the Text property.

In this new version, Tweetinvi matches with ALL the fields by default (MatchOn.Everything).

// Match only on the Tweet Text or any of the entities of the tweet,
fs.MatchOn = MatchOn.TweetText | MatchOn.AllEntities; 

MatchingTweetReceived

MatchingTweetReceived event args now includes all the matching information that are used by Tweetinvi to detect if a Tweet is matching or not.

var tracks = args.MatchingTracks;
var followers = args.MatchingFollowers; // newvar locations = args.MatchingLocations; // new

The event args now also includes a new MatchOn property that let you know which fields of the Tweet have been used to match the tweet.

Therefore if args.MatchOn == MatchOn.UrlEntities it means that the tweet has been matched on a url but not via the text.

MatchingTweetAndLocationReceived

This event has been deleted because you can now access all the information in MatchingTweetReceived as explained above.

Rate Limits

TwitterQuery now includes 2 new fields that are QueryRateLimits and CredentialsRateLimits.
This can be quite useful when registering the TweetinviEvents.

Videos Upload

  • Videos are now automatically uploaded in chunks of 2 MB. This simplify the upload of videos > 5 MB.

Other improvements

  • Improved the models documentation.
  • Improved error handling.
  • UnBlockUser is now accessible from the AuthenticatedUser as well as the static User class.

var success = User.UnBlockUser("bidochon");
// ORvar authenticatedUser = User.GetAuthenticatedUser();
authenticatedUser.UnBlockUser("bidochon");
  • ITrends now includes the tweet_volume field/

Bug Fixes

  • Fixed potential deadlock when using tweetinvi async functions.
  • PublishTweet/Message failed when used with a mix of special characters.
  • Tweet.GetTweets correctly returns collection with a single matching element.

New Post: switch to latest TweetInvi 09.11.0

$
0
0
Bonjour Linvi,
I just started a new app with your latest version. I'm not a hightend developper :(
I just need to lauch a "search" every minutes on a simple query.
I've tryed some codes and my VB.net hang when i try to search tweets.
My twitter codes (consumer, consumer secret, token, token secret) are fine and work well in my previous app, but with an old version of your TweetInvi (09.3.3)
Below 2 tests code :
Imports System
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.IO
Imports System.Linq
Imports System.Reflection
Imports Tweetinvi
Imports Tweetinvi.Core
Imports Tweetinvi.Core.Credentials
Imports Tweetinvi.Core.Enum
Imports Tweetinvi.Core.Extensions
Imports Tweetinvi.Core.Interfaces
Imports Tweetinvi.Core.Interfaces.Controllers
Imports Tweetinvi.Core.Interfaces.DTO
Imports Tweetinvi.Core.Interfaces.Models
Imports Tweetinvi.Core.Interfaces.Streaminvi
Imports Tweetinvi.Core.Parameters
Imports Tweetinvi.Json
Imports SavedSearch = Tweetinvi.SavedSearch
Imports Stream = Tweetinvi.Stream

Public Class Form1
    Public consumer_key As String = "XXX"
    Public consumer_secret As String = "xxxx"
    Public token As String = "xxx-xxxx"
    Public token_secret As String = "xxxxx"

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Test1_GetTweets_Click(sender As Object, e As EventArgs) Handles Test1_GetTweets.Click
        Dim creds = New TwitterCredentials(consumer_key, consumer_secret, token, token_secret)
        ' on Tweets line, below on search, the VB.net hang (in the function)
        Dim Tweets = Auth.ExecuteOperationWithCredentials(creds, Function()
                                                                     Dim SearchParameter = New TweetSearchParameters("#ONPC")
                                                                     SearchParameter.Lang = Language.French
                                                                     SearchParameter.MaximumNumberOfResults = 50
                                                                     SearchParameter.TweetSearchType = TweetSearchType.OriginalTweetsOnly
                                                                     Return Search.SearchTweets(SearchParameter)
                                                                 End Function)
        ' check the return from request
        For Each Tweet In Tweets
            RichTextBox1.AppendText(Tweet.Text & vbCrLf)
        Next
    End Sub

    Private Sub Test2_GetTweets_Click(sender As Object, e As EventArgs) Handles Test2_GetTweets.Click
        ' create the credential/oauth
        Dim creds = New TwitterCredentials(consumer_key, consumer_secret, token, token_secret)

        Dim SearchParameter = New TweetSearchParameters("#ONPC")
        SearchParameter.Lang = Language.French
        SearchParameter.MaximumNumberOfResults = 50
        SearchParameter.TweetSearchType = TweetSearchType.OriginalTweetsOnly
        ' ---- on Tweets line, below on search, the VB.net hang.
        Dim Tweets = Search.SearchTweets(SearchParameter)
        ' check the return from request
        For Each Tweet In Tweets
            RichTextBox1.AppendText(Tweet.Text & vbCrLf)
        Next
    End Sub
End Class
Of course something wrong in my code :(
Could you help me to finaly get tweets
Maybe "TimeLine" or "Streams" are better than search... but search seems more "simple" ;)
Really thank you.

Patrick

New Post: switch to latest TweetInvi 09.11.0

$
0
0
Hello,

First of all please note that Tweetinvi has been migrated on Github. So please remember that the latest documentation/version/issues will be posted there.

Concerning your problem, it is quite hard for me to help you without knowing which error you have. Also I am not familiar with VB. I think I do understand your code but if you are able to share it in C# it would be easier for me to read.

To send me the error, please use the ExceptionHandler as explained in the doc : https://github.com/linvi/tweetinvi/wiki/Exception-Handling.

Cheers,
Linvi

Created Unassigned: .net 4.6.1 supported? [2667]

$
0
0
Hi,

.net 4.6.1 supported?

i'm app is working in previous .net version but recently its failing, the only update is the framework in my server. thanks!

regards,

tags

New Post: How to get all tweets out of Search.SearchTweets

$
0
0
Hey,

I am having a trouble to come up with the solution which could give me all tweets matching searching criteria and not to restrict response collection set on MaximumNumberOfResults value.

Speaking in example:
I have since and until date time range set on a day, location and radius and now I want to get all tweets regardless on how many of them are available. The best solution saves the rank of requests needed to trigger from client side.

Thanks in advance

New Post: How to get all tweets out of Search.SearchTweets

New Post: How to get all tweets out of Search.SearchTweets

$
0
0
I am not sure if this is an issue.
Sounds to me like a feature which has not been implemented, yet.

My 2 cents, not really for issue page :/

New Post: How to get all tweets out of Search.SearchTweets

$
0
0
You can post in issues as there is no such thing as discussions on github (which is a shame).
I will classify your "issue" as a feature request if it is.

New Post: want to know if posting to Twitter is success or failed after Tweet.PublishTweetWithImage

$
0
0
I want to know if posting to Twitter is success or failed after Tweet.PublishTweetWithImage
after this method call, I want to display error (if posting to Twitter is failed for some reason)

Created Release: Tweetinvi 0.9.13.0 (Jun 13, 2016)

$
0
0
The new version of Tweetinvi has now been released!

You can check it out on github here(https://github.com/linvi/tweetinvi/releases/tag/0.9.13.0).

Main changes

  • Json Serialization - Support of IUserDTO and ITweetDTO.
  • RateLimits - Improved accuracy.
  • Authentication Flow - New properties to make web developers life easier.
  • Upload - New endpoints added.

Released: Tweetinvi 0.9.13.0 (Jun 13, 2016)

$
0
0
The new version of Tweetinvi has now been released!

You can check it out on github here(https://github.com/linvi/tweetinvi/releases/tag/0.9.13.0).

Main changes

  • Json Serialization - Support of IUserDTO and ITweetDTO.
  • RateLimits - Improved accuracy.
  • Authentication Flow - New properties to make web developers life easier.
  • Upload - New endpoints added.

Updated Release: Tweetinvi 0.9.13.0 (Jun 13, 2016)

$
0
0
The new version of Tweetinvi has now been released!

You can check it out on github here(https://github.com/linvi/tweetinvi/releases/tag/0.9.13.0).

Main changes

  • Json Serialization - Support of IUserDTO and ITweetDTO.
  • RateLimits - Improved accuracy.
  • Authentication Flow - New properties to make web developers life easier.
  • Upload - New endpoints added.

Released: Tweetinvi 0.9.14.0 (Jun 23, 2016)

$
0
0
The new version of Tweetinvi has now been released!

This release is an early version to support the coming new Extended Tweets from the Twitter REST API.

You can check it out on github
here.

Created Release: Tweetinvi 0.9.14.0 (Jun 23, 2016)

$
0
0
The new version of Tweetinvi has now been released!

This release is an early version to support the coming new Extended Tweets from the Twitter REST API.

You can check it out on github
here.

New Post: Should the tweet message be less than 140 chars?

New Post: Should the tweet message be less than 140 chars?

$
0
0
Hello,

Tweetinvi has migrated to Github. Please ask the questions on it next time.

To answer your question, Tweetinvi provides a string extension method allowing you to get the Length as Twitter calculates it (string.TweetLength).
var length = "https://google.Dummy.com/AnotherDummy/Test.aspx?guid=8e2e2a64-da89-4645-9871-991cd72fe677&action=REFRESH".TweetLength();
Cheers,
Linvi

Released: Tweetinvi 1.0 (Jul 05, 2016)

$
0
0
The first major release of Tweetinvi is now out.

You can check it out on github
here.
Viewing all 4126 articles
Browse latest View live


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