WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Tools include new retweets? (5 posts)

  1. Mistainu
    Member
    Posted 4 years ago #

    Twitter Tools doesn't import "retweets" i make with Twitter's new retweets feature. can it be made to? if it's featured on my Twitter feed then i would like to archive it as well. perhaps have Twitter tools file it under another category?

    http://wordpress.org/extend/plugins/twitter-tools/

  2. adamf
    Member
    Posted 3 years ago #

    Has there been any update as to when this might be implemented?

  3. trojanloy
    Member
    Posted 3 years ago #

    I managed to create a partial workaround by editing twitter-tools/twitter-tools.php so that the following line...

    define('AKTT_API_USER_TIMELINE', 'http://twitter.com/statuses/user_timeline.json');

    ...now reads:

    define('AKTT_API_USER_TIMELINE', 'http://api.twitter.com/1/statuses/user_timeline.json?include_rts=true');

    This causes "new retweets," or "newfangled retweets" as I like to call them (also known as "native retweets," I guess), to post like all other tweets. HOWEVER, they have the same limitation as newfangled RTs in the Twitter RSS feed -- they are truncated after 140 characters if the retweeted tweet is long enough that adding "RT @originaluser" before the tweet causes it to exceed 140. Ugh! Among other things, this makes it pointless for displaying RTs of long-ish tweets that have links at the end, since you lose part of the URL.

    I can't figure out why this is happening -- I know it's *possible* to avoid it, because when you import new RTs into FriendFeed, it doesn't happen -- or how to fix it. Any ideas?

  4. trojanloy
    Member
    Posted 3 years ago #

    UPDATE: I tried changing the code again, to the following...

    define('AKTT_API_USER_TIMELINE', 'http://api.twitter.com/1/statuses/retweeted_by_me.json');

    If successful, this would ONLY import "new retweets," and then I'd need to find some way to merge the functionality of retweeted_by_me.json with user_timeline.json. But it doesn't matter, because I had the same problem as before... retweeted_by_me.json imported my RTs, but cut them off if they exceeded 140 characters (including the original tweeter's username). So evidently FriendFeed isn't using an unmodified version of retweeted_by_me.json, which was my theory.

  5. Loubonez
    Member
    Posted 3 years ago #

    trojanloy, I hope you are still watching this thread, cause it sounds like you know more about this stuff than I do. If you go to http://dev.twitter.com/console and change the GET path to statuses/retweeted_by_me.json you can look at the response data. Notice that line 64 is in the top level of the hierarchy, called "text", and contains the tweet with "RT @user:". However, line 15 is one level deep, inside "retweeted_status" and contains the original text. Also notice all of the data inside "retweeted_status" is of the original tweet, which is what we (or at least I) want. Now since I know nothing about JSON, can anyone figure out how to change the association of the text field?

Topic Closed

This topic has been closed to new replies.

About this Topic