Likes enable insight into who likes your tweets and delivers accurate counts of likes. Gnip’s Firehose and Decahose can deliver public likes related to the Tweets delivered via Gnip. This yields real-time public engagement and audience metrics associated with a Tweet.

Getting Started with Likes 

As you prepare to consume likes data, you should know that:

  • Likes are delivered via an independent, separate stream
  • Likes are historically referred to as “Favorites”. The original/native format payload maintains this nomenclature
  • Streams include only public likes
    • Public means that the liking user, Tweet creator and Tweet are all public on the platform
  • Likes are very similar to Retweets and represent a public signal of engagement
  • Payload elements include:
    • Original Tweet object
    • Actor object that created the original Tweet
    • Actor object that performed the like action
  • Only original content can be liked
    • Retweets cannot be liked. A like of a Retweet is applied to the original Tweet
    • Quoted Tweets can be liked
  • Like activities include applicable Gnip Enrichments (where purchased/applied)
  • Supported Products / Features
    • Likes streams support Backfill (where purchased/applied)
    • There is no Replay support for likes streams
    • There is no Search or Historical support for likes
    • There is no immediate plans to add likes support to PowerTrack
    • We would be interested to hear about your interest in, willingness to pay for, and use cases supported by the inclusion of likes in these other products/features

Decahose 

  • For the 10% sample Tweets delivered in the Decahose, stream includes 100% of the applicable public likes
  • Partitions: 2
  • URL Structure
    • https://gnip-stream.twitter.com/stream/sample10-likes/accounts/<accountName>/publishers/twitter/<streamLabel>.json?partition=1

Firehose 

  • Stream includes 100% of the public likes
  • Partitions: 20
  • URL Structure
    • https://gnip-stream.twitter.com/stream/firehose-likes/accounts/<accountName>/publishers/twitter/<streamLabel>.json?partition=1

Original Format Payload 

{  
   "id":"43560406e0ad9f68374445f5f30c33fc",
   "created_at":"Thu Dec 01 22:27:39 +0000 2016",
   "timestamp_ms":1480631259353,
   "favorited_status":{  
      "created_at":"Thu Dec 01 22:27:16 +0000 2016",
      "id":804451830033948672,
      "id_str":"804451830033948672",
      "text":"@kafammheppduman",
      "source":"\u003ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003eTwitter for Android\u003c\/a\u003e",
      "truncated":false,
      "in_reply_to_status_id":803694205163814912,
      "in_reply_to_status_id_str":"803694205163814912",
      "in_reply_to_user_id":2855759795,
      "in_reply_to_user_id_str":"2855759795",
      "in_reply_to_screen_name":"kafammheppduman",
      "user":{  
         "id":2855759795,
         "id_str":"2855759795",
         "name":"delirdim kanka",
         "screen_name":"kafammheppduman",
         "location":"sanane",
         "url":"http:\/\/instagram.com\/kafammheppduman",
         "description":"Manit @GalatasaraySk \ud83d\udc9e",
         "translator_type":"none",
         "protected":false,
         "verified":false,
         "followers_count":3702,
         "friends_count":607,
         "listed_count":1,
         "favourites_count":113338,
         "statuses_count":389,
         "created_at":"Sat Nov 01 22:38:25 +0000 2014",
         "utc_offset":7200,
         "time_zone":"Istanbul",
         "geo_enabled":true,
         "lang":"tr",
         "contributors_enabled":false,
         "is_translator":false,
         "profile_background_color":"C0DEED",
         "profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png",
         "profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png",
         "profile_background_tile":false,
         "profile_link_color":"1DA1F2",
         "profile_sidebar_border_color":"C0DEED",
         "profile_sidebar_fill_color":"DDEEF6",
         "profile_text_color":"333333",
         "profile_use_background_image":true,
       "Profile_image_url": "http:\/\/pbs.twimg.com\/profile_images\/804421763945861121\/v3bp9pnq_normal.jpg",
         "Profile_image_url_https": "https:\/\/pbs.twimg.com\/profile_images\/804421763945861121\/v3bp9pnq_normal.jpg",
         "profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/2855759795\/1480630085",
         "default_profile":true,
         "default_profile_image":false,
         "following":null,
         "follow_request_sent":null,
         "notifications":null
      },
      "geo":null,
      "coordinates":null,
      "place":null,
      "contributors":null,
      "is_quote_status":false,
      "retweet_count":0,
      "favorite_count":0,
      "entities":{  
         "hashtags":[],
         "urls":[],
         "user_mentions":[  
            {  
               "screen_name":"kafammheppduman",
               "name":"delirdim kanka",
               "id":2855759795,
               "id_str":"2855759795",
               "indices":[  
                  0,
                  16
               ]
            }
         ],
         "symbols":[]
      },
      "favorited":false,
      "retweeted":false,
      "filter_level":"low",
      "lang":"und"
   },
   "user":{  
      "id":774146932365070336,
      "id_str":"774146932365070336",
      "name":"Uyuyan Adam",
      "screen_name":"saykoMenn",
      "location":"Tarsus, T\u00fcrkiye",
      "url":"http:\/\/connected2.me\/pmc1i",
      "description":null,
      "translator_type":"none",
      "protected":false,
      "verified":false,
      "followers_count":414,
      "friends_count":393,
      "listed_count":0,
      "favourites_count":9868,
      "statuses_count":370,
      "created_at":"Fri Sep 09 07:26:26 +0000 2016",
      "utc_offset":null,
      "time_zone":null,
      "geo_enabled":false,
      "lang":"tr",
      "contributors_enabled":false,
      "is_translator":false,
      "profile_background_color":"F5F8FA",
      "profile_background_image_url":"",
      "profile_background_image_url_https":"",
      "profile_background_tile":false,
      "profile_link_color":"1DA1F2",
      "profile_sidebar_border_color":"C0DEED",
      "profile_sidebar_fill_color":"DDEEF6",
      "profile_text_color":"333333",
      "profile_use_background_image":true,
      "Profile_image_url": "http:\/\/pbs.twimg.com\/profile_images\/802992813424201728\/VMzcTL3x_normal.jpg",
      "Profile_image_url_https": "https:\/\/pbs.twimg.com\/profile_images\/802992813424201728\/VMzcTL3x_normal.jpg",
      "profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/774146932365070336\/1480283382",
      "default_profile":true,
      "default_profile_image":false,
      "following":null,
      "follow_request_sent":null,
      "notifications":null
   }
}

Activity Streams Format Payload 

{  
   "id":"object:search.twitter.com,2005:4065325abe8fa9fd0c70391c3e5767a7",
   "verb":"like",
   "postedTime":"2016-12-01T22:44:32.209Z",
   "provider":{  
      "objectType":"service",
      "displayName":"Twitter",
      "link":"http:\/\/www.twitter.com"
   },
   "object":{  
      "id":"tag:search.twitter.com,2005:804035301312233473",
      "objectType":"activity",
      "verb":"post",
      "postedTime":"2016-11-30T18:52:08.000Z",
      "generator":{  
         "displayName":"Twitter for iPhone",
         "link":"http:\/\/twitter.com\/download\/iphone"
      },
      "provider":{  
         "objectType":"service",
         "displayName":"Twitter",
         "link":"http:\/\/www.twitter.com"
      },
      "link":"http:\/\/twitter.com\/davis_marybeth\/statuses\/804035301312233473",
      "body":"Yes I'm a theatre major but yes I get terrified when I have to do a presentation in class. \u270a\ud83c\udffc",
      "actor":{  
         "objectType":"person",
         "id":"id:twitter.com:378827404",
         "link":"http:\/\/www.twitter.com\/davis_marybeth",
         "displayName":"Marybeth Davis",
         "postedTime":"2011-09-23T21:52:17.000Z",
         "image":"https:\/\/pbs.twimg.com\/profile_images\/800174062718898176\/tFonhSkm_normal.jpg",
         "summary":"Jesus-follower | Coffee-drinker | Disney-lover | Theatre-er...",
         "friendsCount":369,
         "followersCount":399,
         "listedCount":0,
         "statusesCount":1485,
         "twitterTimeZone":null,
         "verified":false,
         "utcOffset":null,
         "preferredUsername":"davis_marybeth",
         "languages":[  
            "en"
         ],
         "links":[  
            {  
               "href":null,
               "rel":"me"
            }
         ],
         "favoritesCount":2400
      },
      "object":{  
         "objectType":"note",
         "id":"object:search.twitter.com,2005:804035301312233473",
         "summary":"Yes I'm a theatre major but yes I get terrified when I have to do a presentation in class. \u270a\ud83c\udffc",
         "link":"http:\/\/twitter.com\/davis_marybeth\/statuses\/804035301312233473",
         "postedTime":"2016-11-30T18:52:08.000Z"
      },
      "favoritesCount":0,
      "twitter_entities":{  
         "hashtags":[],
         "urls":[],
         "user_mentions":[],
         "symbols":[]
      },
      "twitter_lang":"en",
      "retweetCount":0,
      "twitter_filter_level":"low"
   },
   "actor":{  
      "objectType":"person",
      "id":"id:twitter.com:772646649885851648",
      "link":"http:\/\/www.twitter.com\/Cashwright2016",
      "displayName":"Chloe Wright",
      "postedTime":"2016-09-05T04:04:51.228Z",
      "image":"https:\/\/pbs.twimg.com\/profile_images\/772651169491607552\/Adbn0W-E_normal.jpg",
      "summary":null,
      "friendsCount":285,
      "followersCount":64,
      "listedCount":0,
      "statusesCount":22,
      "twitterTimeZone":null,
      "verified":false,
      "utcOffset":null,
      "preferredUsername":"Cashwright2016",
      "languages":[  
         "en"
      ],
      "links":[  
         {  
            "href":null,
            "rel":"me"
         }
      ],
      "location":{  
         "objectType":"place",
         "displayName":"Knoxville, TN"
      },
      "favoritesCount":229
   },
   "objectType":"activity"
}

Like Delete / “Unlike” Payload 

{  
   "delete":{  
      "favorite":{  
         "tweet_id":696615514970279937,
         "tweet_id_str":"696615514970279937",
         "user_id":2510287578,
         "user_id_str":"2510287578"
      },
      "timestamp_ms":"1480437031205"
   }
}

Compliance Guidance 

  • Compliance only possible via Gnip Compliance Firehose
  • If a tweet is deleted, all likes associated with that Tweet should be deleted (just like its Retweets)
    • We will not deliver individual delete events for each Like in this scenario
  • If a user protects/deletes his/her account, all likes performed by that user should be scrubbed (just like their Retweets)
    • We will not deliver individual delete events for each like in this scenario
  • If a user protects/deletes his/her account, all likes of that user’s Tweets should be scrubbed (just like their Tweets and Retweets)
    • We will not deliver individual delete events for each like in this scenario
  • If a user scrubs their geo, all likes associated with their Tweets should have its geo scrubbed (because the payload contains their original Tweet)
  • If a user removes a like they performed (aka unliked), this is equivalent to a delete of that like and that like should be deleted.
    • We will deliver an event in the Compliance Firehose to reflect these like deletions
    • These like delete events will not include an ID for the original like event and will instead include the TweetID that was liked and the User that performed that like (a user can only like a Tweet once at a time)