I am able to get the "code" in my redirect Url but unable to get access token.
I tried sending POST request using POSTMAN and also from java code but "invalid_grant" error i got.
Response {"error_description":"invalid authorization code","error":"invalid_grant"}
HttpClient client = new HttpClient();
PostMethod post = new PostMethod("https://login.salesforce.com/services/oauth2/token");
post.setParameter("grant_type", "authorization_code");
post.setParameter("client_id", "MASKED");
post.setParameter("client_secret", "MASKED");
post.setParameter("redirect_uri", "https://www.facebook.com/");
post.setParameter("code", "xxxxxxxxxxxxxxxxxxxxxxxxxxx");
What I am missing in the above code ?