这是我的 java 代码,以及我作为参数传递的 URL 字符串。如果我将 URL 复制粘贴到浏览器上,它可以工作。
String strURL="SELECT post_id, actor_id, permalink, message, impressions, type, likes, comment_info, share_count, created_time , updated_time FROM stream WHERE source_id='<srcid>'";
OAuthRequest authRequest = new OAuthRequest(Verb.GET, "https://graph.facebook.com/fql");
authRequest.addBodyParameter("q", strURL);
service.signRequest(accessToken, authRequest);
Response authResponse = authRequest.send();
System.out.println(authResponse.getBody());
错误消息 - 20:12:58,986 INFO [stdout] (http-localhost-127.0.0.1-8080-2) {"error":{"message":"(#601) Parser error: unexpected end of query.", “类型”:“OAuthException”,“代码”:601}}