sscarpa / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Missing files in apiAnalyticsService.php #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The file called 'apiAnalyticsService.php' is missing from the update 0.4.7, yet 
I found it it SVN.

Now, in the file (apiAnalyticsService.php' found on the SVN I have these 3 
lines of code:

require_once 'service/apiModel.php';
require_once 'service/apiService.php';
require_once 'service/apiServiceRequest.php';

The location of the apiAnalyticsService.php is: src/contrib/

The problem is that in the folder /contrib/ there isn't any other folder called 
'service', so those 3 lines are useless added, since the files are missing, yet 
the folder service is one folder back.

Also I am getting several errors trying while tring to check 
'examples/analytics/simple.php', can someone take a look?

Original issue reported on code.google.com by wtstats....@gmail.com on 25 Dec 2011 at 3:01

GoogleCodeExporter commented 8 years ago
The analytics service is currently available on trunk, and will be included in 
the next release (0.4.8).

>The problem is that in the folder /contrib/ there isn't any other folder 
called 'service', so those 3 lines are useless added.
This should work because the include path was updated in apiClient.php via 
set_include_path()

>Also I am getting several errors trying while tring to check 
'examples/analytics/simple.php', can someone take a look?
Which error are you getting?

Original comment by chiragsh...@gmail.com on 29 Dec 2011 at 5:06

GoogleCodeExporter commented 8 years ago
Hey, thanks for your reply.

This is the error I'm getting when I try to access 
examples/analytics/simple.php.

Fatal error: Cannot access protected property apiClient::$io in 
C:\xampp\htdocs\ga\src\io\apiREST.php on line 55

Note: I get this on both LAMP and XAMPP

Original comment by wtstats....@gmail.com on 29 Dec 2011 at 6:50

GoogleCodeExporter commented 8 years ago
Hey wtstats,

Can you verify that you're using the latest version on trunk?

Original comment by chiragsh...@gmail.com on 3 Jan 2012 at 6:05

GoogleCodeExporter commented 8 years ago
same path to the problem but I get:

Catchable fatal error:  Argument 1 passed to apiServiceRequest::__construct() 
must implement interface apiIO, null given, 
...../google-api-php-client/src/service/apiServiceResource.php on line 96 and 
defined in ......./google-api-php-client/src/service/apiServiceRequest.php on 
line 50

got the trunk version (as of jan 6 2012) and all elements of credential ok. 

it goes like this:
step 1: getting to Google for permission: ok
step 2: returning with the token: ok => 
{"access_token":"ya29.AHES6ZS-KcNF0d_r-HNwnRKe_MJCeMeK8bOdYgiSZo9O2A","token_typ
e":"Bearer","expires_in":3600,"refresh_token":"1\/8EfzaHz}

step 3 (as in examples/analytics/simple.php) 
when getting to: 
if (isset($_SESSION['token'])) {
    print "<h1>Got token" . $_SESSION['token'] ."</h1><pre>";
  $client->setAccessToken($_SESSION['token']);
}

kaboom... in setAccessToken.

any idea, fix or workaround will be very welcome. 

Original comment by t...@mobile-culture.net on 6 Jan 2012 at 12:08

GoogleCodeExporter commented 8 years ago
Hey Tom, it looks like we're making progress!

What's the value of $_SESSION['token']?
var_dump($_SESSION['token']);

Original comment by chirags@google.com on 6 Jan 2012 at 4:36

GoogleCodeExporter commented 8 years ago
Nevermind, by recloning the repo, I was able to have it work. So in a nutschell 
do get the latest version on trunk. 

Original comment by t...@mobile-culture.net on 6 Jan 2012 at 9:04

GoogleCodeExporter commented 8 years ago
Excellent! Thank you Tom for the update.

Original comment by chirags@google.com on 6 Jan 2012 at 9:09