我正在使用REST API將Pinterest集成到我的Android應用程序中,但在嘗試訪問類別時出現錯誤。如何在Android應用中正確整合Pinterest?
我的代碼:
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!"
}
查看[此鏈接](http://www.datasprings.com/resources/articles-information/pinterest-api-programming)並查看如何使用Pinterest API身份驗證。 – yorkw