Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 是什么导致Klout API出现403错误?_Java_Api_Klout - Fatal编程技术网

Java 是什么导致Klout API出现403错误?

Java 是什么导致Klout API出现403错误?,java,api,klout,Java,Api,Klout,我有一个Klout的API密钥,我编写了一个每天执行6次调用的服务,以跟踪6个社交媒体帐户的性能。这项服务上周突然停止工作 这是我帐户上日志的概述: 我混淆了我的钥匙,但正如你所看到的,我的启动计划的状态是活动的;但是:错误显示403非活动计划代理: 在它所说的被编辑的地方,有一个Twitter句柄和一个API密钥 施工单位及相关方法为: private String apiKey; public Klout(String apiKey) { this.apiKey = apiKey;

我有一个Klout的API密钥,我编写了一个每天执行6次调用的服务,以跟踪6个社交媒体帐户的性能。这项服务上周突然停止工作

这是我帐户上日志的概述:

我混淆了我的钥匙,但正如你所看到的,我的启动计划的状态是活动的;但是:错误显示403非活动计划代理:

在它所说的被编辑的地方,有一个Twitter句柄和一个API密钥

施工单位及相关方法为:

private String apiKey;

public Klout(String apiKey) {
    this.apiKey = apiKey;
}

public UserId getUserIdFromTwitterScreenName(String screenName) throws IOException {
    return new UserId(new JSONObject(KloutRequests.sendRequest(String.format(
            KloutRequests.ID_FROM_TWITTER_SCREENNAME, screenName, apiKey))));
}

public static String sendRequest(String request) throws IOException {
    URL url = new URL(request);
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setRequestMethod("GET");
    connection.setUseCaches(false);
    BufferedReader in = new BufferedReader(
            new InputStreamReader(connection.getInputStream()));
    String line;
    StringBuilder response = new StringBuilder();
    while ((line = in.readLine()) != null) {
        response.append(line);
    }
    in.close();
    return response.toString();
}

我能想到的唯一一件事是Klout停用了我的帐户,但当我登录Klout时,这并没有反映在我的帐户面板中,但也许我忽略了代码中非常简单的东西。这些指标还显示,我每天拨打的电话从未超过6次,这远远低于关键的费率限制。

我收到了一条推特回复:

Tweet指的是:

我写这封信是想让你知道,锂离子电池公司已决定在2018年5月25日关闭Klout服务


简而言之:我使用的服务不再可用,因为Klout将被中断。

在我看来,这就像是对Klout支持的查询。好的,我没有找到Klout支持的邮件地址,但我刚刚向他们发送了以下推文:
private String apiKey;

public Klout(String apiKey) {
    this.apiKey = apiKey;
}

public UserId getUserIdFromTwitterScreenName(String screenName) throws IOException {
    return new UserId(new JSONObject(KloutRequests.sendRequest(String.format(
            KloutRequests.ID_FROM_TWITTER_SCREENNAME, screenName, apiKey))));
}

public static String sendRequest(String request) throws IOException {
    URL url = new URL(request);
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setRequestMethod("GET");
    connection.setUseCaches(false);
    BufferedReader in = new BufferedReader(
            new InputStreamReader(connection.getInputStream()));
    String line;
    StringBuilder response = new StringBuilder();
    while ((line = in.readLine()) != null) {
        response.append(line);
    }
    in.close();
    return response.toString();
}