When getting user_timeline, I have an inconsistency between regular tweets and retweets returned by the API.
The problem I have is as follow:
My user @NicPurple1 favorited tweet 256538358367526912. This was originally a tweet ( 255858881987764224 ) by @EnTherapie, but what my user favorited was the retweet by @TV5Plus.
When my user goes to https://twitter.com/TV5Plus, he sees the little star in the corner showing the tweet is a favorite.
When my user goes to https://twitter.com/EnTherapie, he sees the little star in the corner showing the tweet is a favorite.
So far so good…
Then my user goes to my WebApp and my server attempts to get the @TV5Plus user_timeline in his name ( he authorized my Twitter App ).
If my server gets the original tweet from @EnTherapie, here is what it gets ( I trimmed some of the stuff, if you need the whole thing. let me know ):
[{
"created_at": "Wed Oct 10 02:34:45 +0000 2012",
"id": 255858881987764224,
"id_str": "255858881987764224",
"text": "@MarilenePilon @LOUBARDE ...Tous les clients sont uniques tout comme leurs souffrances... #enth\u00e9rapie",
"source": "web",
"truncated": false,
"user": {
"id": 804826434,
"id_str": "804826434"
},
"favorited": true,
"retweeted": false
}]
As you can see, the tweet is marked as favorited. Unfortunately, this is not the timeline my WebApp displays… I got it only for debugging purposes.
If my server gets the tweets from @TV5Plus, here is what it gets ( I trimmed some of the stuff, if you need the whole thing. let me know ):
[{
"created_at": "Thu Oct 11 23:34:45 +0000 2012",
"id": 256538358367526912,
"id_str": "256538358367526912",
"text": "RT @EnTherapie: @MarilenePilon @LOUBARDE ...Tous les clients sont uniques tout comme leurs souffrances... #enth\u00e9rapie",
"source": "\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e",
"truncated": false,
"user": {
"id": 95449863,
"id_str": "95449863"
},
"retweeted_status": {
"created_at": "Wed Oct 10 02:34:45 +0000 2012",
"id": 255858881987764224,
"id_str": "255858881987764224",
"text": "@MarilenePilon @LOUBARDE ...Tous les clients sont uniques tout comme leurs souffrances... #enth\u00e9rapie",
"source": "web",
"truncated": false,
"user": {
"id": 804826434,
"id_str": "804826434"
},
"favorited": false,
"retweeted": false
},
"retweet_count": 3,
"entities": {
....
},
"favorited": false,
"retweeted": false
}]</code>
In this case, the tweet is not marked as favorited in either the body of the tweet itself ( and it is tweet 256538358367526912 which is what my user favorited ) or in the tweet inside the retweeted_status property ( which was marked as favorited when I got it directly from the @EnTherapie timeline ).
My application displays the user_timeline of @TV5Plus, my user favorited the tweet in that timeline, but now, my user cannot see this tweet favorited when I refresh @TV5Plus for him.
What am I doing wrong ? Should I use another API to get @TV5Plus tweets ? I like user_timeline and I'd rather continue using it since this is ultimately what I want, but maybe I am missing a parameter. My command was:
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=TV5Plus&include_rts=1&trim_user=true&count=2
I have control of the NicPurple1 account if anybody wants me to try anything.