peter addy - 2015-09-03 20:02:02
I am working with the login_with_fitbit.php example, using OAuth 1.0a and saving the authentication information in the MySQL table `oauth_session`. I can successfully do this on my development server. However, when I attempt this on my production server I get an unexpected error.
I create a new mysqli_client_class. My php log shows:
Checking the OAuth token authorization state
No OAuth session is set
Creating a new OAuth session
Query: INSERT INTO oauth_session (session, state, access_token, access_token_secret, expiry, authorized, type, server, creation, refresh_token, access_token_response) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
The log ends there. It looks like the session parameters are not being set.
FWIW, if I create a new oauth_client_class instead, the parameters are set, I am redirected to the Fitbit website, and the app is authorized. Then I get the error
Error message: Call to undefined method oauth_client_class::SetUser()
presumably because I am using the wrong class, and nothing is written to the `oauth_session` table. But this shows I am able to move past the Query INSERT INTO step and successfully connect to Fitbit.
Why does the mysqli_client_class not continue past the Query: INSERT INTO step? Any suggestions?
Thanks so much for creating this class!