Grow your CSS skills. Land your dream job.

How to query & display latest tweet on website w/ Twitter’s v 1.1 API?

  • # April 6, 2013 at 3:31 pm

    _I know this seems like a basic question, but please read on…_ Chris has both a PHP and Javascript (JSON) code snippet on his website of how to query Twitter and pull in a latest tweet, but I believe both of these methods are deprecated or will soon become deprecated now that Twitter is transitioning from their v 1 API to v 1.1.

    From what I’ve read in Twitter’s API transition, they will be shutting off support of their XML (RSS) support as well as their Javascript (& JSON?) support as it is too intensive on their servers.

    For a while now, I have been using the Chirp.js Javascript library to pull in my latest tweet and display it on my website. The thing that I really liked about pulling in tweets via Javascript was that I could style them however I pleased both for my site and for client sites. Does anybody know how I can still accomplish this now with the v 1.1 API?

    The only thing I have come across thus far is Twitter’s new Embedded Widgets to embed a Timeline on your site. The only thing I’ve figured out so far is going that route and then using CSS selectors to only display the first tweet in the timeline and I have to use a super-hackish method to style all aspects of the tweet.

    In short, I’m really hating Twitter right now. I don’t give a rip about server-strain. I’m pretty confident they’re doing just fine. Anyways, has anyone figured out a solution now that we can’t use Javascript to pull in our latest tweet(s) and style them?

    Would appreciate any help/advice/or insight on this. Thanks CSS-Tricks community!!

    # April 6, 2013 at 7:22 pm

    > Does anybody know how I can still accomplish this now with the v 1.1 API?

    You can’t unless you’re storing the tweets yourself in a database, unfortunately. Twitter wants you to use their widget.

    # April 7, 2013 at 9:30 pm

    The way I read it is that all feeds will still be available as a json feed, the only difference is that the rate limits have dropped and all apps will require authentication?

    https://dev.twitter.com/blog/changes-coming-to-twitter-api

    # June 13, 2013 at 12:44 pm

    Unless…

    I wrote a post on the subject today. It also includes a js work around.

    # June 27, 2013 at 6:48 am

    Here is also great widget: http://laurib.edicy.co/siutsur-load-tweets-without-oauth

    # July 27, 2013 at 7:16 am

    A quick update to my comment above, I’ve now also covered how to display your tweets using OAuth (authentication).

    Here’s the post: Embedded timelines with API V1.1 OAuth

    # August 21, 2013 at 9:02 am

    Ps. Blog post updated with embedded timelines now taking into account urls @mentions and #hashtags.

    Link to Github repo available on the post.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".