我正在使用REST API将Pinterest集成到我的Android应用中,但在尝试访问类别时遇到错误。
我的代码:
String url = "https://api.pinterest.com/";
String allCategories = "/v2/boards/categories/";
RestClient client = new RestClient(url + allCategories);
String response = "";
try {
client.AddParam("limit", "36");
try {
client.Execute(RequestMethod.GET);
} catch (Exception e) {
e.printStackTrace();
}
response = client.getResponse();
} catch (Exception e) {
System.out.println(">>> Exception >>> " + e + " >>> Message >>> "
+ e.getMessage());
}
System.out.println(">>> response >>> " + response);
Log.d(">> Login response >>> ", response);
我从端点返回以下错误:
{
"message": "Please upgrade your app!",
"error": "Authentication failed: Please upgrade your app!"
}
答案 0 :(得分:0)
Pinterest
没有任何官方api,而且非正式的api是not working now。因此,我不认为您的代码会以任何方式工作,除非有人发现任何其他非官方API或Pinterest发布正式版本。
PS:More Info。
答案 1 :(得分:-1)