Hi asif, for logout method I use this code in java :
CODE
Random rand = new Random(System.currentTimeMillis() / 1000);
String link3 = "http://developer.messenger.yahooapis.com/v1/session?";
link3 += "&oauth_consumer_key=" + CONSUMER_KEY;
link3 += "&oauth_nonce=" + rand.nextDouble();
link3 += "&oauth_signature_method=" + "PLAINTEXT";
link3 += "&oauth_timestamp=" + (System.currentTimeMillis() / 1000);
link3 += "&oauth_token=" + OAUTH_TOKEN;
link3 += "&oauth_version=" + "1.0";
link3 += "&oauth_signature=" + CONSUMER_SECRET + "%26" + OAUTH_SECRET;
link3 += "&sid=" + SESSION_ID;
HttpClient hc = new DefaultHttpClient();
HttpDelete get = new HttpDelete(link3);
get.setHeader("Content-type", "application/json; charset=utf-8");
Try this maybe it works...