… one of the many things i hate: UPDATES! Because: Never change a running system… and if you do have to, make proper backups and test restore of backup.

twitter has no backups.

they dropped v1.0 completely, maybe someone can explain to me why.

{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}

checked 2014.03 there is no newer api than 1.1. https://dev.twitter.com/docs/api

what this means: EXTRA WORK! A LOT!

demo: http://dwaves.de/TWITTER/

you should see the first 5 twitter feeds from tagesschau.

twitter api migration - what you should see

what you need to do to get it working on your server:

1. get source (php + jquery)

2. get keys

3. make shure cURL is available

1. get source (php + jquery)

you need a working example that you can adapt.

download source: http://dwaves.de/TWITTER_API_1.1_EXAMPLE_PHP.tar.gz

helped me a lot: http://www.webdevdoor.com/javascript-ajax/custom-twitter-feed-integration-jquery/

2. get keys

sign in on: with your twitter credentials: https://dev.twitter.com/apps/

click on create app…

you will need to sign in to twitter dev center and get those keys:

        $consumerkey = "aj190239p0fjkdls";
        $consumersecret = "sdfj1278397s89dfksdlhjk1238978s9df";
        $accesstoken = "12321232-jskdlf78hjkdvz89ehzui3";
        $accesstokensecret = "sjdkfldu872389478sdhfjk";

you will need to edit the file inside the http://dwaves.de/TWITTER_API_1.1_EXAMPLE_PHP.tar.gz

that is named:

getTweets1.1.php

and insert your keys.

3. make shure cURL is available

if you get „internal server error“

check if cURL is available on your server.

and you have your own webserver (with ssh access)

# aptitude search curl|grep php
p   php5-curl                       - CURL module for php5
aptitude install php5-curl

# restart webserver
/etc/init.d/lighttpd restart

otherwise contact your admin.

ps: okay the relativeTime function is completely crap. (got it from some page)

maybe can someone help?

here is javascript way of parsing JSON that you can also easily generate with this:

http://jsfiddle.net/mUcCh/ (this is not a complete working example but a snippet that can be used to parse getTwitterv1.1.php->JSON  + display the output properly)

links: https://dev.twitter.com/docs/api/1.1/overview … no one really studies these kind of super details example lacking documents.

admin