Richard
|
Posted: November 29, 2011 09:07 by Richard
|
|
Thank you for this wonderful library, especially loving the fact it has entity support too. However I'm trying to find if there is a way to generate an oAuth echo Authorization header. For those that don't know oAuth echo is the process used to allow you to use Twitpic, yFrog etc without sending user details. Basically what I'm looking for is the ability to create a signed header to verify_credentials.json or verify_credentials.xml, grab that oAuth authentication header and then use it in my own code to perform the upload request. |
oAuth echo support
Replies: 3 - Last Post: November 30, 2011 02:11
by: Ernandes Mourao Junior
by: Ernandes Mourao Junior
showing 1 - 4 of 4
Ernandes Mourao Junior
|
Posted: November 29, 2011 11:47 by Ernandes Mourao Junior
|
|
Hi, Thank you for the compliments. Check out the class com.twitterapime.xauth.OAuthSigner. There you will find all your answers. Regards, |
Richard
|
Posted: November 29, 2011 16:32 by Richard
|
|
Perfect thanks for that I've now successfully uploaded an image to TwitPic using this. I'm wondering if perhaps we could include a file upload class in the library and pass parameters such as the host, etc and then you'd just need to call an HttpFileUpload class and it'll all be signed for you? Anyway here is how I got the header for reference for anyone else trying to do this. HttpRequest req = new HttpRequest("https://api.twitter.com/1/account/verify_credentials.json"); XAuthSigner signer = new XAuthSigner( c.getString(MetadataSet.CREDENTIAL_CONSUMER_KEY), c.getString(MetadataSet.CREDENTIAL_CONSUMER_SECRET)); signer.sign(req, token); Hashtable headers = req.getHeaderFields(); String oAuthEchoHeader = (String) headers.get("Authorization"); |
Ernandes Mourao Junior
|
Posted: November 30, 2011 02:11 by Ernandes Mourao Junior
|
|
Great it worked! Why not? Send the upload class to me so I can analyze it. Regards, |
Replies: 3 - Last Post: November 30, 2011 02:11
by: Ernandes Mourao Junior
by: Ernandes Mourao Junior







