Hi Colin,
Thanks for spotting that typo.The error however remains even after changing 
"customer" to "consumer".
Regards,
Kennedy
 

    On Friday, January 22, 2016 10:34 PM, Colin Watson <cjwat...@canonical.com> 
wrote:
 
 

 On Fri, Jan 22, 2016 at 09:08:00PM +0000, Kennedy Torkura wrote:
> Many thanks for responding.My code is below :
> public class tester {
>   public static void main(String[] args) throws ClientProtocolException, 
> IOException{
>     CloseableHttpClient httpclient = HttpClients.createDefault();
>     HttpPost httpPost = new HttpPost("https://launchpad.net/+request-token";); 
>    httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded");   
>  // Content-type: application/x-www-form-urlencoded
>     List <NameValuePair> nvps = new ArrayList <NameValuePair>();    
> nvps.add(new BasicNameValuePair("oauth_customer_key", "myHPIClients"));    
> nvps.add(new BasicNameValuePair("oauth_signature_method", "PLAINTEXT"));    
> nvps.add(new BasicNameValuePair("oauth_signature", "%26"));    
> httpPost.setEntity(new UrlEncodedFormEntity(nvps));    CloseableHttpResponse 
> response2 = httpclient.execute(httpPost);
                                                                                
                      ^^^^^^^^^^^^^^^^^^

Try spelling this correctly as "oauth_consumer_key" and see if that
helps.

(I'm at the end of my day so haven't actually tried this code out yet,
but I spotted this from a quick read-through.)

-- 
Colin Watson                                    [cjwat...@canonical.com]


 
  
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to