以下 FQL 查询在我将其粘贴到浏览器时有效,并且在 API 资源管理器中也有效(xxxx 替换为数字和访问令牌)
https://graph.facebook.com/fql?q=SELECT page_id from place WHERE (distance(latitude, longitude,"xxxxx","xxxxx") < xxxx)&access_token=<MY ACCESS TOKEN>
当我从我的 java 应用程序运行相同的代码时,我得到一个 HTTP 400 错误。知道是什么原因造成的吗?
以下代码实现了连接。getInputStream() 抛出异常(错误 400)
connection = (URLConnection) new URL(url).openConnection();
input = connection.getInputStream();