Something else I stumbled over, as encoding the signature in the header is required some places, using $tuenc here will replace + with %20, which is not desired. (you want the normal value %2B)
Also some clarification on my last post: What I meant was you need to sort the params before putting it into the hmacsha1. For example if you used "status" as a param it would be put at the end of the params, and if you use something like "message" it will be in the front of params like before "oauth_nonce" etc. (Without it the signature will only support params with names from p-z)