Sidebar Menu

Projects

  • Dashboard
  • Research Project
  • Milestones
  • Repository
  • Tasks
  • Time Tracking
  • Designs
  • Forum
  • Users
  • Activities

Login

  • Login
  • Webmail
  • Admin
  • Downloads
  • Research

Twitter

Posts by stumathews
Stuart Mathews
  • Home
  • Blog
  • Code
  • Running
  • Gaming
  • Research
  • About
    • Portfolio
    • Info

Not authorized to use this endpoint : RokTwittie

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
18.Jun
18 June 2011
Last Updated: 30 October 2015
Hits: 13241

Its broke.

One of the things that has irritated me ever since the internet began is our reliance on having our data elsewhere - not on our servers. The other is our reliance on 3rd party internet services as we cannot always say that they will always be up, their services won't change dramatically and break existing solutions which rely on past functionality.

I suppose the main point is that the internet service industry is not for those that see change as bad for maintainability. Expect change even though it sucks to!

I use a twitter module from rocket theme that allows me to use my twitter account to show detail to my users on my personal website. Recently twitter has changed the implementation of their service, more specifically the URLs that roktwittie uses to connect to twitter. So obviously this change is not good for roktwittie as it now doesn't work.

Rocket theme will fix the problem - if you pay them to. That means upgrading to the next version of roktwittie. I'm using version 0.9 release on the 15 Jan 2010.) Obviously, they wont tell you how to fix it yourself because then they wont get money for the potential upgrades. I say power to the user, if you can understand the fix, then do it yourself!

[div class="attention" class2="icon"] Backup your {joomla_root}/modules/mod_roktwittie/ folder just in case. If you don't and my programming sucks, too bad for you...[/div]

Fixing it

First you need to edit the file {joomla_root}/modules/mod_roktwittie/roktwittie.class.php:

First, on line 26, change this:

{codecitation class="brush: php; gutter: true;"}

"rate_limit" => "http://twitter.com/account/rate_limit_status.xml",
 		"status" => "http://twitter.com/users/show.xml?screen_name=",
 		"friends" => "http://twitter.com/statuses/friends/",
 		"messages" => "http://twitter.com/statuses/user_timeline/"{/codecitation}

to this

{codecitation class="brush: php; gutter: true;"}

"rate_limit" => "http://api.twitter.com/1/account/rate_limit_status.xml",
 		"status" => "http://api.twitter.com/1/statuses/followers/ids.xml?screen_name=",
 		"friends" => "http://api.twitter.com/1/friends/ids.json?screen_name=",
 		"messages" => "http://api.twitter.com/1/statuses/user_timeline/ids.xml?screen_name="

{/codecitation}

So we're basically just changing the url end points.

Then on line 97 comment out the first two lines of the checkError function, and then add a "return false;" at the end:

{codecitation class="brush: php; gutter: true;"}

//if (substr(\(string, 2, 3) != "xml") return "Data appears to be invalid.";

//else return false;

// make sure it always returns false

return false;{/codecitation}


Now on 249, change the following line from

{codecitation class="brush: php; gutter: true;"}
\)httpinfo = \(this->curl(\)this->url[\(type].\)user.((\(type != 'status') ? '.xml' : ''), \)this->raw_data);{/codecitation}
to

{codecitation class="brush: php; gutter: true;"}
\(httpinfo = \)this->curl(\(this->url[\)type].\(user.((\)type != 'status') ? '' : ''), \(this->raw_data);{/codecitation}

Which basically removes the .xml extension from the request to twitter.


And then finally comment out en entire if statement starting on line 252(starts with if (\)this->php_version < "5.1.3")):

{codecitation class="brush: php; gutter: true;"}
/*   if (\(this->php_version < "5.1.3") {   \)xml[\(count] = new JSimpleXML;   \)xml[\(count]->loadString(\)this->raw_data);       if (isset(\(xml[\)count]->document->error[0])) { return \(xml[\)count]->document->error[0]->data(); }       \(xml[\)count] = \(xml[\)count]->document;       switch (\(type) {   case "status": \)output[\(user] = \)this->parseStatus(\(xml[\)count]); break;   case "friends": \(output[\)user] = \(this->parseFriends(\)xml[\(count]); break;   case "messages": \)output[\(user] = \)this->parseMessages(\(xml[\)count]); break;   }       } else {   \(xml = simplexml_load_string(\)this->raw_data);   if (isset(\(xml->error)) { return (string)\)xml->error; }       switch (\(type) {   case "status": \)output[\(user] = \)this->parseStatus(\(xml); break;   case "friends": \)output[\(user] = \)this->parseFriends(\(xml); break;   case "messages": \)output[\(user] = \)this->parseMessages($xml); break;   }   }*/{/codecitation}


And then your roktwittie should be working. Or mine is :-)

interesting

Java Exams

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
16.Jun
16 June 2011
Last Updated: 30 October 2015
Hits: 6216

Yesterday I wrote my final JAVA exams in London. I surprisingly found that I'd been there before as one of my London "adventure" walks. It was in Holborn, I remember passing through here the other day and telling someone at work how Holborn was OK. I arrived early, like 2 hours early which really helped my disposition as I was able to find out details of the exam procedure when I arrived and knew exactly what I needed to do when I returned. Oh, and I found the place which was important.

I spent my time wondering really, taking alternative routes to those I knew or took previously while in Holborn. Grabbed a really dodgy drink which was a bitter drink but because I sadly could not read the Italian print on the can, I thought I'd just give it a try. Bad mistake - sucked hugely.
While managing my disgust I sipped my hell water until I got to Starbucks and for the first time sat down in like a totally cafe kind of way - facing the road, chillaxing, sipping a strawberry frapppucino and just taking it easy.

Oh wait, that was after I found myself following people to a busy street Market which I perused before heading onwards.

One thing I obviously knew was how miserably early I was but interestingly enough that really didn't bother me, in fact it suits my disposition. I wanted loads of time before the exam. I wanted to ease my way into the exam and I did and it felt good. So, about the year end exam - it was pretty challenging but I think I've passed the year so really I'm looking to see what is next on the agenda. I'm quite interested in Databasing/Clustering as it's not a strong point of mine(or at least my colleagues can walk circles around me!) so that might be the next thing, then again perhaps advanced Java programming would be better - something where you learn more about practical solution implementation than just the language syntax( I pretty much know for a multitude of other languages in the same vain) but then again I tend to solve these problems by making real problems myself and solving them by writing programs. I dunno but I think it will have to be different.

On the way home after 3 hour exam I found myself at Bank station which at 17:30 was crowded. I waited for 2 tubes and then got miffed and knew I could walk say towards the themes river, embankment area - do I did, ended up in Embankment after a awesome walk(I was going to say fresh-air walk but who am I kidding) which far out-classed a smelly tube journey, I headed home from Waterloo.

Decided, when I got home, to try the 2km run to the gym just to get back into the swing if things. it worked, I enjoyed it, body was fine but probably worked a bit too hard at the gym because I'm tired this morning.

oh well, life is great!

Slowly

Details
Category: Blog
By Stuart Mathews
Stuart Mathews
13.Jun
13 June 2011
Last Updated: 30 October 2015
Hits: 5480

My weekend wasn't particularly active this weekend with, I think, still remnants of my cold or flu still lurking. I'm not one who wants to muck about with the body's recovery process. So sadly I haven't been running or gyming or doing anything that remotely involves cardio or elevated breathing. Sounds a bit conservative perhaps but well, there you go.

I did get myself a portable wireless mouse that I've had my eye on for what must be months - I got that now so perhaps I'll sleep better at night? No, seriously - it's pretty cool and it fits my PC perfectly. Even used it remotely at the gym. Ok whatever it's just a mouse but sometimes if it's something that makes you feel more comfortable with, I rekon small things like that can really increase ones drive and efficiency.

Another of my purchases this weekend was a cable. ooh, a cable you say. And yes a cable but this cable was supposed to connect my guitar to my iPhone so I could bypass my interface unit and MacBook to play guitar through awesome filters. No so. Cable's bust so going to have return. I nearly flipped. Anyway, the cool thing about the apple store is that they email you your receipt so I got that.

In other random news, I have new found respect for the Ebola Virus which according to a documentary on Discovery, is the most deadly and most catastrophic virus on the planet with 90-100 kill rate. Also the Bubonic plague is a nastie which could break-out at any time as all known sources *might* be contained. Woah, you say - I know!

I also managed to, after months of procrastination, to order broadband which should be up and running next week - such a good feeling. Interesting deal is that the first 6 months are free. Cool. So, I'll wait for that with anticipation(now that I've said that, I'll just wait normally!). The only thing left now is to wait for the router to arrive at the office.

Edit: Today has been a good day

More Articles …

  1. Ha-tissue
  2. Bowling me right over
  3. Being wrong
  4. Motion detection & Jarvis
  5. Why stars die
  6. Blink182
  7. Wednesdays are cooler
  8. Randomly
  9. Weekend you very much?
  10. Tweet My Everything
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117

Page 113 of 182