Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with integration of namelivia/laravel-fitbit/ package in Laravel

ANSWERED

Dear all,

i have a problem integrating this package to the Laravel. Process of implementation pasted ok, but when i call in my controller 1 line of code:

public function index()
    {
        Fitbit::activities()->activity()->getLifetimeStats();
    }

Application is returning me a constant error:

TypeError: Argument 1 passed to GrahamCampbell\Manager\AbstractManager::makeConnection() must be of the type string, null given, called in C:\projects\hypknowledge\vendor\graham-campbell\manager\src\AbstractManager.php on line 75 in file C:\projects\hypknowledge\vendor\graham-campbell\manager\src\AbstractManager.php on line 133

I don`t know what to do, days are passing by, and i cannot solve an issue.

 

Thank you in advance

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Also when i try this peace of code:

public function index()
    {
        Fitbit::connection('main')->activities()->activity()->getLifetimeStats();
    }

 

It returns me an error:

InvalidArgumentException: Connection [main] not configured. in file c:\projects\test\vendor\graham-campbell\manager\src\AbstractManager.php on line 189

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

Also when i try this peace of code:

public function index()
    {
        Fitbit::connection('main')->activities()->activity()->getLifetimeStats();
    }

 

It returns me an error:

InvalidArgumentException: Connection [main] not configured. in file c:\projects\test\vendor\graham-campbell\manager\src\AbstractManager.php on line 189
Best Answer
0 Votes

Hi @Vassco 

 

I'm not sure what is causing these errors.  If you received this code from an open source project, did you reach out to that person for help?  Also, here's the link to the documentation for Get Lifetime Stats, https://dev.fitbit.com/build/reference/web-api/activity/#get-lifetime-stats.   Check that the library you're using is creating the endpoint correctly.

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes