【发布时间】:2017-05-02 21:38:30
【问题描述】:
我在访问 URL 时遇到 java.net.unknownhostexception,但我可以通过浏览器访问。
public static void main(String[] args) throws IOException, JSONException`enter code here`
{
JSONObject json = readJsonFromUrl("https://graph.facebook.com/page_id/?
access_token=xxxxx&fields=name,likes,posts");
System.out.println(json.toString());
System.out.println(json.get("likes"));
}
【问题讨论】:
标签: facebook-graph-api json.net facebook-java-api