Giter Site home page Giter Site logo

Comments (2)

isimmons avatar isimmons commented on August 20, 2024

Found the problem. Not with linkify(). As a RT that exceeds the 140 char limit it gets truncated. https://dev.twitter.com/docs/platform-objects/tweets

The truncated value should be set to true but for some odd reason it is false so I'm just ensuring that any retweet uses the 'retweeted_status' instead of 'text' since RTs should be the only time truncation would occur. If I need to limit chars on RTs I can do it in my own code.

foreach ($timeline as $tweet) {
        if(isset($tweet->retweeted_status))
        {
            $tweet->text = $tweet->retweeted_status->text;
        }          
    }

from twitter.

thujohn avatar thujohn commented on August 20, 2024

Thank you for pointing this problem.

I tried this too and I get some curious values.
Twitter say status not truncated and the link's indices are 139-140...

'truncated' => boolean false
'urls' => 
    array (size=1)
      0 => 
        array (size=4)
          'url' => string 'http://t.co/xq4QUBWT1V' (length=22)
          'expanded_url' => string 'http://bit.ly/1hZyeLI' (length=21)
          'display_url' => string 'bit.ly/1hZyeLI' (length=14)
          'indices' => 
            array (size=2)
              0 => int 139
              1 => int 140

from twitter.

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.