php - I failed to get facebook recource page using this java code: -
for test want seek facebook recource page using java code: work other site facebook\ twitter, solutions?
public class readwebpage { public static void main(string[] args) { string urltext = "http://www.facebook.com"; bufferedreader in = null; seek { url url = new url(urltext); in = new bufferedreader(new inputstreamreader(url.openstream())); string inputline; while ((inputline = in.readline()) != null) { system.out.println(inputline); } } grab (exception e) { e.printstacktrace(); } { if (in != null) { seek { in.close(); } grab (ioexception e) { e.printstacktrace(); } } } } }
what errors returned? suspect has "http://www.facebook.com/" redirecting "https://www.facebook.com". suggest trying https address , seeing if corrects problem.
java php html facebook
No comments:
Post a Comment