Twitter sign in works in localhost but gives error in live website


I have used twitter oauth for my website in PHP. It works perfectly in my localhost but gives me the following error in my live website:
Whoa there!
The request token for this page is invalid. It may have already been used, or expired because it is too old. Please go back to the site or application that sent you here and try again; it was probably just a mistake.

I have also tried changing the time zone of my live server but it also does not help.

Please help me


Does the “Whoa there!” page have a URL like:


If it’s the second one the server is having issues getting a request token and you probably don’t have there right consumer key/secret or the clock on server is not accurate.