I am trying to fetch the user token from twitter API.
while redirecting from twitter API it stores the things in sessions. And I can fetch that credentials from session.
It is working fine on localhost. but while doing so on live server I am getting an empty php session. it is showing an empty array
I am trying to fetch the user token from twitter API. while redirecting from
Share
did you checked to have
session_start()in your scripts?Usually, your local php deployment has php.ini setting
session.auto_start = 1by default. on production server this may not be true, so it is crucial to explicitly definesession_start()in your scripts if you want to be sure it will work anywhere.Also check php.ini setting
session.use_cookiesif session id is sent to users browser by cookie, or it has to be sent manually via url query parameter like?PHPSESSID=....