
Originally Posted by
DrByte
Just taking a wild guess ...
Your github connection.php file mentions $token_path = 'token.json'; ... without any directory qualifier. If you were to be specific about its actual path that might be enough.
so if the token's in either path if it's referenced correctly it will work, however it if make the token.json (which was generated from google's quickstart code) into token.json.bak it not longer works because much of the google_client object's empty...
Code:
Google\Client Object
(
[auth:Google\Client:private] =>
[http:Google\Client:private] =>
[cache:Google\Client:private] =>
[token:Google\Client:private] =>
[config:Google\Client:private] => Array
(
[application_name] => Gmail API PHP Quickstart
[base_path] => https://www.googleapis.com
[client_id] => 787788787563-blbahlbah.apps.googleusercontent.com
[client_secret] => blbahlbah
[credentials] =>
[scopes] =>
[quota_project] =>
[redirect_uri] => urn:blbahlbah:wg:oauth:2.0:oob
[state] =>
[developer_key] =>
[use_application_default_credentials] =>
[signing_key] =>
[signing_algorithm] =>
[subject] =>
[hd] =>
[prompt] => select_account consent
[openid.realm] =>
[include_granted_scopes] =>
[login_hint] =>
[request_visible_actions] =>
[access_type] => offline
[approval_prompt] => auto
[retry] => Array
(
)
[retry_map] =>
[cache] =>
[cache_config] => Array
(
)
[token_callback] => Closure Object
(
[this] => Google\Client Object
*RECURSION*
[parameter] => Array
(
[$cacheKey] =>
[$newAccessToken] =>
)
)
[jwt] =>
[api_format_v2] =>
)
[logger:Google\Client:private] =>
[deferExecution:Google\Client:private] =>
[requestedScopes:protected] => Array
(
[0] => https://www.googleapis.com/auth/gmail.readonly
)
)
..then it throws...
PHP Fatal error: Uncaught Error: Call to a member function createAuthUrl() on null in C:\xampp\htdocs\mysite\site\admin\includes\classes\yoyo_connection.php:30
Stack trace:
#0 C:\xampp\htdocs\mysite_from_gitlab\pebs\mysite\includes\classes\yoyo.php(37): Connection->get_unauthenticated_data()
#1 C:\xampp\htdocs\mysite_from_gitlab\pebs\mysite\amazon_gmail_orders.php(31): Yoyo->go()
#2 {main}
thrown in C:\xampp\htdocs\mysite_from_gitlab\mysite\admin\includes\classes\yoyo_connection .php on line 30
Bookmarks