missing characters at the end

Oct 13, 2012 at 9:40 PM

hello there,

first what i have to say, its a great project i find. thanks!!

my problem is as follows: in some tweets the last characters is missing.
an example:

the browser:
"Wenn du mich aufgeküsst hast, werde ich mir meinen Mund zurückholen, und dann werde ich auch wieder sprechen. Aber das hat Zeit."

Linq2Twitter:
"RT @Juchtenkaeferl: Wenn du mich aufgeküsst hast, werde ich mir meinen Mund zurückholen, und dann werde ich auch wieder sprechen. Aber d ..."

the last 10 character was replaced by "..." do i something wrong?


Sebastian

Coordinator
Oct 13, 2012 at 10:24 PM

Hi Sebastian,

I'm it seems like you're looking at two different tweets. The first is the original tweet, but the second is a retweet.  See the "RT @Juchtenkaeferl: " in the second tweet - it's taking 21 extra characters of space. As you know, Twitter only allows 140 characters. I'm wondering if either the person who retweeted or Twitter added the three dots to the end.

There are two things you can do to check:

1. Compare Status IDs of each tweet. You can get the status ID of the first by expanding the tweet, looking a details, and seeing the status id in the Page URL. On the second, the status ID is available in LINQ to Twitter.

2. Use Fiddler2 to inspect the HTTP response of your query and read the JSON payload from Twitter.  This will show if the tweet arrived from Twitter this way.

Joe

 

Nov 4, 2012 at 12:13 PM
Edited Nov 4, 2012 at 12:14 PM

Hi Joe,

I am noticing this in case of all re tweets in home timeline and I agree with Sebastian.

Linq2Tweeter seems to be prepending RT: @TwitterHandle to every tweet that's re-tweeted. If you look at the same retweet item in other twitter clients the entire tweet comes up and it is attribute to the original tweeter (the attribution part have to do ourselves, but the entire 140 chars of text should be returned).

I am linking to a screenshot of two apps side by side. The one on the left is something I am working using using Linq2Tweeter and on the right is the Twitter web interface.

https://twitter.com/sumitkm/status/265078747873562625/photo/1/large

I am looking into the Linq2Tweeter code to see if I can decipher where this is happening. Any inputs from your side will help.

Thanks and Regards,

Sumit.

Nov 4, 2012 at 1:14 PM

Okay, I think this is not a Linq2Tweeter issue, it's a Twitter issue instead! I believe Twitter is returning Retweets as such. Gotta retrieve the original tweet to get the full text. This is a little cheesy on Twitter's part because that extra call will go towards Rate Limits. Sigh!

Nov 4, 2012 at 9:53 PM
Edited Nov 4, 2012 at 9:56 PM

Hello Sebastian,

I finally figured out how to retrieve retweets without doing a second call to twitter. Following is my call to get the Timeline

timelineResponse = (from tweet in twitterCtx.Status
                    where tweet.Type == type &&
                    tweet.ScreenName == LoggedInUser.ScreenName &&
                    tweet.SinceID == sinceId &&
                    tweet.IncludeEntities == true &&
                    tweet.IncludeRetweets == true
                    select new TweetItem(tweet.StatusID,
                        tweet.User.Name,
                        tweet.User.Identifier.ScreenName,
                        tweet.User.ProfileImageUrl,
                        tweet.Text,
                        tweet.Text,
                        tweet.CreatedAt,
                        tweet.RetweetedStatus,
                        tweet.Entities,
                        matches)
).ToList<TweetItem>();

Here TweetItem is a custom view model class I have, however what's important is the tweet.IncludeRetweets == true setting in the where clause.

Once you do that the tweet object returned by the query will have RetweetedStatus populated correctly. Now for every tweet that comes in check if tweet.RetweetedStatus.StatusID is null or empty. If it's not null/empty means the current tweet is a retweet and the RetweetedStatus has the original tweet that you should use.

Hope this helps,

Sumit.