facebook,同个接口,用postman请求就可以,用java去发请求就不行

需要换取长时间的Facebook口令,用postman去发送请求就可以返回正常结果,用java去发送就不行

img

img

有没有对网络编程这一块熟悉的朋友帮忙一下?

pairs没放到httpPost的参数里啊

HttpPost httpPost = new HttpPost(url);
httpPost.setEntity(new UrlEncodedFormEntity(pairs, "UTF-8"));
CloseableHttpResponse response = httpClient.execute(httpPost);

看看headers,可能是有些header没设置