I am building a login application in android in which i am hitting a url(with username and password) upto that part it works fine but after that whenever I am hitting a url(
My problem was that i login first and saved the returned session in userpreferences. After that the POST call to set a record said
"Error ,Cannot authenticate the User"
So i added
post.setHeader("oAuth-Token", UserPreferences.ACCESS_TOKEN);
the whole thing looks like this.
HttpPost post=new HttpPost(URL );
post.setHeader("oAuth-Token", UserPreferences.ACCESS_TOKEN);
. . and It solved the problem.