0

I am trying with simple scenario stated below:

  • Initiating the Webdriver instance and logging in to the facebook page
  • trying to GET the response for the Browser_all/nullState.php?**sometext for the same

I am getting following error.

Error ! Not Logged in

though I am getting the 200 response, and as mentioned I am hitting the url after logging into my FB account can somebody help me and let me know why I am getting this error response and any suggestion to how to overcome it?

I have written the httpClient using HttpURLConnection api in java.

RealSkeptic
  • 33,993
  • 7
  • 53
  • 79
Vikki Lohana
  • 39
  • 2
  • 10
  • Are you saying that you are logging in to Facebook with your browser, but then you're trying to get to a URL in Facebook with `HttpURLConnection`? – RealSkeptic Nov 01 '15 at 18:43
  • I have written a code using java,selenium to open the FB and login post when I login I am trying to get the responSe information I.e code and header for which I used http client – Vikki Lohana Nov 02 '15 at 03:18
  • Well, you have to use the same client for logging in and for making requests. Logging in sets a cookie in the client. If you use a different client, it doesn't use the cookie. It's like logging in to FB on Firefox and then wondering why you are not logged in in Chrome. – RealSkeptic Nov 02 '15 at 05:35

0 Answers0