【发布时间】:2017-10-28 08:13:16
【问题描述】:
我正在使用 VK API,并设置了一个应用程序并设置了到目前为止我需要的一切。
但是,当我针对 mz 配置文件调用 account.GetProfiles 方法时,我收到以下错误消息:
{"error":{"error_code":15,"error_msg":"Access denied: no access to call this method","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"account.getProfileInfo"},{"key":"uid","value":"430334214"}]}}
我的查询代码如下:
String getProfile = "https://api.vk.com/method/account.getProfileInfo?uid="+userID+"&access_token="+oauth2Token;
URL profile = new URL(getProfile);
HttpURLConnection connection = (HttpURLConnection) profile .openConnection();
System.out.println("/#/Debug: "+profile .toString());
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
有人有想法吗?不幸的是,网上的英文并不多……我已经挣扎了一个多小时试图弄清楚这个……
如果我只是调用getProfiles 方法,一切都像一个魅力,但我想获得更多的数据......
干杯
【问题讨论】: