Hey Guys,
I'm developing a basic Android app for interfacing with powershop
(similar functionality to the iPhone app) and I'm having some trouble
when trying to POST a meter reading...
Firstly, I'm using the Android standard library + Signpost OAuth
Library (
http://code.google.com/p/oauth-signpost/). You can find some
example code of what I'm doing here:
http://gist.github.com/513554
Using this library and method works great when doing GET's -
everything is authenticated and returned correctly. By default the
signpost library puts the OAuth information in the "Authorization:"
header.
However, when I try and post a set of meter readings I will always get
"[E903] Invalid OAuth token".
I've tried the following:
- Putting the OAuth information in the "Authorization" header, as per
the GET request
- Putting the OAuth information in the URL query parameters
- Sending the icp/reading information as part of form/post data
- Sending the icp/reading information in the url query parameters
- Not signing the request at all (I get "[E901] invalid oauth
signature method")
I've also gone as far as setting up a stub on my own server to post
the same request to and verify that all the data is there and well-
formed. As far as I can tell, it is.
So, can anybody give me a hint at what might be wrong, some other
things to try? Am I POSTing the data correctly? Or am I looking at a
Signpost bug and I should take it up with them?
Cheers,
Chris.