Well, this has pretty much nothing to do with Twitter’s API, you’re having a problem indexing an associative array with a value which happens to be an URL.
It’s really hard to debug what might be the issue or where to encode/decode data without knowing where you’re getting $obj from, or seeing the code you’re using, or knowing which libraries you might be using. I’d suggest that you use PHP’s print_r function to print $obj and see what kind of data structure you’re working with.