Twitter Mention Length Doesn't Match Mention IDs Length


#1

Hi

We sometimes receive tweets with a different number of mentions to mention IDs:

“id”: “1e4d0bc523b3ab00e0740bde17e9b50c”,

“mentions”: [“ConcoursSteam”, “ItsWariax_”, “ConcourOFGaming”],
“mention_ids”: [2965113856, 3081682692],

In this instance the first and third accounts are valid and the second account I’m unable to find on twitter using their API console. At a guess I would say it has been deleted, banned, or never actually existed. Link to the tweet:

https://twitter.com/ConcoursSteam/status/577111814967791616

Is this behaviour correct? Is there any way of changing the ordering so that the IDs match the mentions and the invalid accounts are last in the list? At the moment we have to ignore both fields are we are unable to rely on the screen name matching the ID.

Many thanks

Alex


#2

Are you able to provide the full JSON interaction which exhibited this behaviour?


#3

Hi Jason

Sorry for the slow response. I’ve not been able to find the same interaction however whilst I was looking I found a similar interaction:

{
“demographic”: {
“gender”: “male”
},
“interaction”: {
“schema”: {
“version”: 3
},
“source”: “Twitter Web Client”,
“author”: {
“username”: “AntoineRato”,
“name”: “Michel Michel Michel”,
“id”: 286129609,
“avatar”: “http://pbs.twimg.com/profile_images/520290609483882496/Wf-tG3Rs_normal.jpeg”,
“link”: “https://twitter.com/AntoineRato”,
“language”: “fr”
},
“type”: “twitter”,
“created_at”: “Mon, 23 Mar 2015 13:29:16 +0000”,
“received_at”: 1.4271173570478E9,
“content”: “RT @ConcoursSteam: :arrow_right:️️CONCOURS​:arrow_left:️\n\n​:point_right:Tente de gagner une Razer DeathAdder​:raised_hands:\n\nIl vous suffit de RT + FOLLOW @ItsWariax_ & @ConcourOFGaming :boom: http://t.co/gDpbywBphV”,
“id”: “1e4d1609a139ae00e074f94258da3d26”,
“link”: “https://twitter.com/AntoineRato/status/579998348217839616”,
“mentions”: [“ConcoursSteam”,
“ItsWariax_”,
“ConcourOFGaming”],
“mention_ids”: [2965113856,
3081682692]
},
“klout”: {
“score”: 40
},
“language”: {
“tag”: “fr”,
“tag_extended”: “fr”,
“confidence”: 98
},
“salience”: {
“content”: {
“sentiment”: 3
}
},
“twitter”: {
“id”: “579998348217839616”,
“retweet”: {
“text”: “:arrow_right:️️CONCOURS​:arrow_left:️\n\n​:point_right:Tente de gagner une Razer DeathAdder​:raised_hands:\n\nIl vous suffit de RT + FOLLOW @ItsWariax_ & @ConcourOFGaming :boom: http://t.co/gDpbywBphV”,
“id”: “579998348217839616”,
“user”: {
“name”: “Michel Michel Michel”,
“description”: “Snapchat : Zlino”,
“location”: “The moon”,
“statuses_count”: 2634,
“followers_count”: 140,
“friends_count”: 301,
“screen_name”: “AntoineRato”,
“profile_image_url”: “http://pbs.twimg.com/profile_images/520290609483882496/Wf-tG3Rs_normal.jpeg”,
“profile_image_url_https”: “https://pbs.twimg.com/profile_images/520290609483882496/Wf-tG3Rs_normal.jpeg”,
“lang”: “fr”,
“listed_count”: 3,
“id”: 286129609,
“id_str”: “286129609”,
“geo_enabled”: false,
“verified”: false,
“favourites_count”: 364,
“created_at”: “Fri, 22 Apr 2011 11:58:46 +0000”
},
“source”: “<a href=\“http: //twitter.com\” rel=\“nofollow\”>Twitter Web Client”,
“count”: 617,
“created_at”: “Mon, 23 Mar 2015 13:29:16 +0000”,
“mentions”: [“ConcoursSteam”,
“ItsWariax_”,
“ConcourOFGaming”],
“mention_ids”: [2965113856,
3081682692],
“media”: [{
“id”: 577111804565938176,
“id_str”: “577111804565938176”,
“media_url”: “http://pbs.twimg.com/media/CAJQIOrWYAA6ALD.jpg”,
“media_url_https”: “https://pbs.twimg.com/media/CAJQIOrWYAA6ALD.jpg”,
“url”: “http://t.co/gDpbywBphV”,
“display_url”: “pic.twitter.com/gDpbywBphV”,
“expanded_url”: “http://twitter.com/ConcoursSteam/status/577111814967791616/photo/1”,
“type”: “photo”,
“sizes”: {
“medium”: {
“w”: 600,
“h”: 374,
“resize”: “fit”
},
“large”: {
“w”: 1023,
“h”: 639,
“resize”: “fit”
},
“thumb”: {
“w”: 150,
“h”: 150,
“resize”: “crop”
},
“small”: {
“w”: 340,
“h”: 212,
“resize”: “fit”
}
}
},
{
“id”: 577111804565938176,
“id_str”: “577111804565938176”,
“media_url”: “http://pbs.twimg.com/media/CAJQIOrWYAA6ALD.jpg”,
“media_url_https”: “https://pbs.twimg.com/media/CAJQIOrWYAA6ALD.jpg”,
“url”: “http://t.co/gDpbywBphV”,
“display_url”: “pic.twitter.com/gDpbywBphV”,
“expanded_url”: “http://twitter.com/ConcoursSteam/status/577111814967791616/photo/1”,
“type”: “photo”,
“sizes”: {
“medium”: {
“w”: 600,
“h”: 374,
“resize”: “fit”
},
“large”: {
“w”: 1023,
“h”: 639,
“resize”: “fit”
},
“thumb”: {
“w”: 150,
“h”: 150,
“resize”: “crop”
},
“small”: {
“w”: 340,
“h”: 212,
“resize”: “fit”
}
}
}],
“filter_level”: “low”,
“lang”: “fr”
},
“retweeted”: {
“id”: “577111814967791616”,
“user”: {
“name”: “:diamonds:️Concours Steam​:diamonds:️”,
“url”: “https://www.youtube.com/channel/UC6RZKSNODWxZXgy3UTFfzRA”,
“description”: “Je fais souvent des concours pour participer il faut me suivre Powered@ConcoursYouTube @Concours_CS_GO @ConcourOfGaming @BuyKey_Europe @ConcoursKdo @RezkSheguey”,
“statuses_count”: 7407,
“followers_count”: 2354,
“friends_count”: 202,
“screen_name”: “ConcoursSteam”,
“profile_image_url”: “http://pbs.twimg.com/profile_images/579577405070827520/aRXM2LmO_normal.jpg”,
“profile_image_url_https”: “https://pbs.twimg.com/profile_images/579577405070827520/aRXM2LmO_normal.jpg”,
“lang”: “fr”,
“time_zone”: “Belgrade”,
“utc_offset”: 3600,
“listed_count”: 6,
“id”: 2965113856,
“id_str”: “2965113856”,
“geo_enabled”: true,
“verified”: false,
“favourites_count”: 15557,
“created_at”: “Tue, 06 Jan 2015 22:29:45 +0000”
},
“source”: “<a href=\“http: //twitter.com/download/iphone\” rel=\“nofollow\”>Twitter for iPhone”,
“created_at”: “Sun, 15 Mar 2015 14:19:13 +0000”
}
}
}


#4

Thanks. I’ve verified that I have seen the same behaviour, and raised a ticket with our engineering team. We hope to have this resolved soon.


#5

In light of our recent announcement regarding Twitter ending DataSift’s Firehose Partnership on August 13th, 2015, it is unlikely that we will invest any further engineering time in changing or improving the Twitter data source.