am trying for oauth2 authentication for imgur Api in
java,i am getting the code from redirect URI but i cannot get the access token from the line
i have to send clientid,clientsecret,granttype,code to access token url by using POST method i tried but i got error like
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.scribe.exceptions.OAuthException: Cannot extract an acces token. Response was: {"data":{"error":"Missing required fields","request":"\/oauth2\/token","method":"GET"},"success":false,"status":400}
org.scribe.extractors.JsonTokenExtractor.extract(JsonTokenExtractor.java:24)
org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:37)
com.durga.ImgurCallbackServlet.doGet(ImgurCallbackServlet.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.16
here is my coding that what i tried is