Giter Site home page Giter Site logo

Comments (1)

IBBoard avatar IBBoard commented on August 16, 2024

That appears to be a "Twitter Says No"/"works as intended" problem.

Here's the JSON that the Twitter v1 API returns for that tweet:

{
  "created_at" : "Sun Mar 27 12:09:05 +0000 2022",
  "id" : 1508053493512298498,
  "id_str" : "1508053493512298498",
  "full_text" : "Saudi Arabian GP: Lewis Hamilton explains SHOCK qualifying exit in 'undriveable' Mercedes car πŸ‘€πŸ‘‡",
  "truncated" : false,
  "display_text_range" : [
    0,
    96
  ],
  "entities" : {
    "hashtags" : [],
    "symbols" : [],
    "user_mentions" : [],
    "urls" : []
  },
  "source" : "<a href=\"https://ads-api.twitter.com\" rel=\"nofollow\">Twitter for Advertisers.</a>",
  "in_reply_to_status_id" : null,
  "in_reply_to_status_id_str" : null,
  "in_reply_to_user_id" : null,
  "in_reply_to_user_id_str" : null,
  "in_reply_to_screen_name" : null,
  "user" : {
    "id" : 368276033,
    "id_str" : "368276033",
    "name" : "Sky Sports F1",
    "screen_name" : "SkySportsF1",
    "location" : "UK",
    "description" : "The official Twitter account of Sky Sports F1.",
    "url" : "https://t.co/rveTyLchrj",
    "entities" : {
      "url" : {
        "urls" : [
          {
            "url" : "https://t.co/rveTyLchrj",
            "expanded_url" : "http://www.skysports.com/f1/",
            "display_url" : "skysports.com/f1/",
            "indices" : [
              0,
              23
            ]
          }
        ]
      },
      "description" : {
        "urls" : []
      }
    },
    "protected" : false,
    "followers_count" : 1425200,
    "friends_count" : 127,
    "listed_count" : 12275,
    "created_at" : "Mon Sep 05 11:16:56 +0000 2011",
    "favourites_count" : 8651,
    "utc_offset" : null,
    "time_zone" : null,
    "geo_enabled" : true,
    "verified" : true,
    "statuses_count" : 59717,
    "lang" : null,
    "contributors_enabled" : false,
    "is_translator" : false,
    "is_translation_enabled" : false,
    "profile_background_color" : "6B6B6B",
    "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_image_url" : "http://pbs.twimg.com/profile_images/1483400272248463360/VaMKOYH3_normal.jpg",
    "profile_image_url_https" : "https://pbs.twimg.com/profile_images/1483400272248463360/VaMKOYH3_normal.jpg",
    "profile_banner_url" : "https://pbs.twimg.com/profile_banners/368276033/1646131551",
    "profile_image_extensions_alt_text" : null,
    "profile_banner_extensions_alt_text" : null,
    "profile_link_color" : "B30000",
    "profile_sidebar_border_color" : "000000",
    "profile_sidebar_fill_color" : "D9D9D9",
    "profile_text_color" : "333333",
    "profile_use_background_image" : true,
    "has_extended_profile" : false,
    "default_profile" : false,
    "default_profile_image" : false,
    "following" : false,
    "follow_request_sent" : false,
    "notifications" : false,
    "translator_type" : "none",
    "withheld_in_countries" : []
  },
  "geo" : null,
  "coordinates" : null,
  "place" : null,
  "contributors" : null,
  "is_quote_status" : false,
  "retweet_count" : 33,
  "favorite_count" : 756,
  "favorited" : false,
  "retweeted" : false,
  "lang" : "en"
}

The Sky Sports link is nowhere in there. They're presumably using the Cards API or something similar. Unfortunately, if Twitter don't supply the data then we can't display it! Hopefully this will be improved in the v2 API that the rebuild of Cawbird will be using.

This is different Cawbird not showing images and summary text for other sites (like BBC News articles), which we could do if we fetched and checked the <head> tags of every linked page to see if they specified a summary and display image.

from cawbird.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.