- In my application am getting Facebook information by using Facebook SDK and data stored in
variables then its working fine.But if am restart the mobile all variables are shows null(in log-cat)
and Application not working properly.
I am passing data to server like this
HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(url); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("firstname",firstname)); nameValuePairs.add(new BasicNameValuePair("lastname", lastname)); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost);
it gives response like this
{
"message": "Successful",
"data": {
"user_id": 32,
"firstname": "myname",
"lastname": "lastname"
}
}
how can i get the user_id from above response or any other way. Please tell me how can i solve these issues.Thanks in advance