tuanxuong / google-api-php-client Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/google-api-php-client
License: Apache License 2.0
Automatically exported from code.google.com/p/google-api-php-client
License: Apache License 2.0
Google APIs Client Library for PHP ===================================== == Description The Google API Client Library enables you to work with Google APIs such as Google+, Drive, Tasks, or Latitude on your server. Requirements: PHP 5.2.x or higher [http://www.php.net/] PHP Curl extension [http://www.php.net/manual/en/intro.curl.php] PHP JSON extension [http://php.net/manual/en/book.json.php] Project page: http://code.google.com/p/google-api-php-client OAuth 2 instructions: http://code.google.com/p/google-api-php-client/wiki/OAuth2 Report a defect or feature request here: http://code.google.com/p/google-api-php-client/issues/entry Subscribe to project updates in your feed reader: http://code.google.com/feeds/p/google-api-php-client/updates/basic Supported sample applications: http://code.google.com/p/google-api-php-client/wiki/Samples == Basic Example <?php require_once 'path/to/src/Google_Client.php'; require_once 'path/to/src/contrib/apiBooksService.php'; $client = new Google_Client(); $service = new Google_BooksService($client); $optParams = array('filter' => 'free-ebooks'); $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams); foreach ($results['items'] as $item) { print($item['volumeInfo']['title'] . '<br>'); }
When using the PHP library we should be able to set curl timeouts which are
expressed in the apiCurlIO class using CURLOPT_CONNECTTIMEOUT and
CURLOPT_TIMEOUT.
Original issue reported on code.google.com by [email protected]
on 25 Oct 2011 at 9:34
What steps will reproduce the problem?
1. i'm using this code:
https://google-plus-php-starter.googlecode.com/svn/trunk/index.php
2. i've inserted my oauth ids, url, secret
3. i'm getting error
What is the expected output? What do you see instead?
expected ouput: anything else than an error. to connect, so i can work around
further, to display something from my profile
i receive the folowing error:
Fatal error: Uncaught exception 'apiIOException' with message 'HTTP Error: (60)
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed' in
C:\wamp\www\googleplus\google-api-php-client\src\io\apiCurlIO.php:120 Stack
trace: #0
C:\wamp\www\googleplus\google-api-php-client\src\auth\apiOAuth2.php(72):
apiCurlIO->makeRequest(Object(apiHttpRequest)) #1
C:\wamp\www\googleplus\google-api-php-client\src\apiClient.php(130):
apiOAuth2->authenticate(Array) #2 C:\wamp\www\googleplus\index.php(46):
apiClient->authenticate() #3 {main} thrown in
C:\wamp\www\googleplus\google-api-php-client\src\io\apiCurlIO.php on line 120
What version of the product are you using? On what operating system?
api php client 0.4.4; win xp, wamp, php 5.3.0, curl_extension enabled,
Please provide any additional information below.
i'm new to this kind of application.
Original issue reported on code.google.com by [email protected]
on 16 Sep 2011 at 12:40
changed the hash to a dot to work with my previous patch (19)
Original issue reported on code.google.com by [email protected]
on 14 Sep 2011 at 10:15
Attachments:
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
Fatal error: Uncaught exception 'apiException' with message 'Unknown function:
adsense->reports->generate()'
What version of the product are you using? On what operating system?
PHP 5.3.4, PHP 5.2.17
Please provide any additional information below.
The issue seems to be in apiAdSenseService.php line 235 where report resource
is initialized. The json_decode returns NULL.
Original issue reported on code.google.com by [email protected]
on 29 Nov 2011 at 8:41
Only start to make API requests if a token exists. If no token exists then the
only thing we should be doing is creating the authorization URL and printing
the Connect Me! link.
Otherwise, an error will be thrown when it tries to refresh a token that
doesn't exist.
Original issue reported on code.google.com by [email protected]
on 17 Aug 2011 at 11:12
Attachments:
The documentation describes a userinfo.profile call
(http://code.google.com/apis/accounts/docs/OAuth2Login.html#userinfocall)
without using Google+.
I can't find in this PHP wrapper how to make that call.
Original issue reported on code.google.com by [email protected]
on 30 Nov 2011 at 12:32
Search API for shopping has parameters like 'debug.enabled', which do not make
valid PHP function arguments.
To reproduce, look at the output of generation with the arguments 'shopping'
'v1'.
The generated file has syntax errors.
Original issue reported on code.google.com by [email protected]
on 14 Jan 2011 at 11:07
What steps will reproduce the problem?
1. I have written the following "index.php" in order to get the user email:
session_start();
require_once "../src/apiClient.php";
require_once "../src/contrib/apiEasyhybridService.php";
$apiClient = new apiClient();
$user = new apiEasyhybridService($apiClient);
if (isset($_SESSION['oauth_access_token'])) {
$apiClient->setAccessToken($_SESSION['oauth_access_token']);
} else {
$token = $apiClient->authenticate();
$_SESSION['oauth_access_token'] = $token;
}
$email = $user->getUseremail();
echo "<pre>Email:\n" . print_r($email, true) . "</pre>";
2. I have run the page in a browser.
What is the expected output? What do you see instead?
Expected:
1) Login to google account request
2) Allow the application to access the user email
3) Print the user email
Instead:
1) Login to google account request
2) Allow the application to access the user email
3) Print the following fatal error :
Fatal error:
Uncaught exception 'apiServiceException' with message 'Error calling GET
https://www.googleapis.com/userinfo/email?alt=json: (500) Internal Error' in
/path/src/io/apiREST.php:85 Stack trace: #0
/path/src/service/apiServiceResource.php(101):
apiREST::execute(Object(apiServiceRequest)) #1
/path/src/contrib/apiEasyhybridService.php(51):
apiServiceResource->__call('get', Array) #2 /path/examples/index.php(84):
apiEasyhybridService->getUseremail() #3 {main} thrown in
/path/src/io/apiREST.php on line 85
What version of the product are you using? On what operating system?
I use the 0.2 version on a LAMP server.
Please provide any additional information below.
I have been able to reproduce this behavior on the google Oauth playground
(http://googlecodesamples.com/oauth_playground/index.php). On the sixtieth
step, if you try to access to https://www.googleapis.com/userinfo/email with
"Stick oauth_* params in: Authorization header" everything works fine and it
returns the user email whereas is you try to access it with "Stick oauth_*
params in: URL as params" it returns an internal error.
So my opinion was that the parameter "?alt=json" was not properly handled and
it was the reason why the server was returning this internal error. So I
managed to remove this parameter from the URL just to figure out if the access
request was working but I got the same result...
I would be very grateful if you could find a workaround or explain me what I am
doing wrong .
Thanks for your time.
Original issue reported on code.google.com by [email protected]
on 24 Nov 2010 at 9:59
Hi,
I know it's probably not the right place to submit this issue but I've found
nothing else better...
When creating a client ID in the Google API Console
(https://code.google.com/apis/console/), you can't submit a "Redirect URIs"
like this one : http://googleplusapi.localhost
Though, http://localhost is considered as a valid URI. So I wondered if there
was any particular reason to this behavior ?
Original issue reported on code.google.com by [email protected]
on 9 Oct 2011 at 12:19
When you use the PHP example of the Urlshortener api in the Google Api PHP
Client 0.4.1 (/google-api-php-client/examples/urlshortener), in the index.php
file, when you are already log in, the form where you put the url to sort it
use a GET method (line 67) but the lines 49 and 52 it search for an POST
variable
Original issue reported on code.google.com by [email protected]
on 12 Sep 2011 at 8:36
Parameter "state" can not be specified on authorization:
/* File apiOAuth2.php */
public function createAuthUrl($service) {
$params = array(
'response_type=code',
'redirect_uri=' . urlencode($this->RedirectUri),
'client_id=' . urlencode($this->ClientId),
'scope=' . urlencode($service['scope'])
);
$params = implode('&', $params);
return self::OAUTH2_AUTH_URL . "?$params";
}
This parameter is missed in this function.
Original issue reported on code.google.com by [email protected]
on 10 Sep 2011 at 7:58
test
Original issue reported on code.google.com by [email protected]
on 28 Nov 2011 at 9:53
Attachments:
What steps will reproduce the problem?
1. Create a script with this content :
<?php
require_once "../../src/apiClient.php";
require_once "../../src/contrib/apiLatitudeService.php";
require_once "includes/header.php";
$apiClient = new apiClient();
$lat = new apiLatitudeService($apiClient);
if (isset($_SESSION['auth_token'])) {
$apiClient->setAccessToken($_SESSION['auth_token']);
} else {
$_SESSION['auth_token'] = $apiClient->authenticate();
}
$latitude1 = $lat->getCurrentLocation('city');
echo "<pre>";
print_r($latitude1);
echo "</pre>";
$latitude2 = $lat->getCurrentLocation('best');
echo "<pre>";
print_r($latitude2);
echo "</pre>";
?>
2. Execute the script and look the result
What is the expected output? What do you see instead?
The result to the line "$latitude1 = $lat->getCurrentLocation('city');" works,
the position is returned, but
the line "$latitude2 = $lat->getCurrentLocation('best');" return an error :
Fatal error: Uncaught exception 'apiServiceException' with message 'Error
calling
https://www.googleapis.com/latitude/v1/currentLocation?granularity=best&alt=json
: (401) Invalid Credentials' in
/home/www/9d39bf010a3c15d51e47350ba58958ce/web/src/io/apiREST.php:85 Stack
trace: #0
/home/www/9d39bf010a3c15d51e47350ba58958ce/web/src/service/apiServiceResource.ph
p(101): apiREST::execute(Object(apiServiceRequest)) #1
/home/www/9d39bf010a3c15d51e47350ba58958ce/web/src/contrib/apiLatitudeService.ph
p(115): apiServiceResource->__call('get', Array) #2
/home/www/9d39bf010a3c15d51e47350ba58958ce/web/examples/latitude/getLatitude.php
(30): apiLatitudeService->getCurrentLocation('best') #3 {main} thrown in
/home/www/9d39bf010a3c15d51e47350ba58958ce/web/src/io/apiREST.php on line 85
What version of the product are you using? On what operating system?
Library version: google-api-php-client 0.2
OS: Linux
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 21 Jan 2011 at 5:51
When i ran the code
https://accounts.google.com/o/oauth2/auth?
client_id=21302922996.apps.googleusercontent.com&
redirect_uri=https://www.example.com/back&
scope=https://www.google.com/m8/feeds/&
response_type=token
from my website, it gave me a 404 error
Original issue reported on code.google.com by [email protected]
on 16 Sep 2011 at 4:12
What steps will reproduce the problem?
1. If you try to call yourPlusInstance->people->get(ID) it doesn't support
parameters.
2. The API though support the parameter 'fields' to indicate whether you want
special parameters or not.
What is the expected output? What do you see instead?
I should be able to use the API completely but instead, I can just retrieve the
'whole' profile of a person, but not concrete fields (as objectType, which is
not returned by default).
What version of the product are you using? On what operating system?
0.4.7. The OS is Linux but the problem is with the code.
Please provide any additional information below.
The problem is found on
/.../google-api-php-client/src/contrib/apiPlusService.php, on line 202 the
function is implemented and it DOES NOT support any extra parameter. If I
change the code there and add mor parameters to $params they will just work as
expected.
Original issue reported on code.google.com by [email protected]
on 15 Dec 2011 at 12:09
What steps will reproduce the problem?
1. Use the bundled exemple for G+ API
What is the expected output? What do you see instead?
Expected extract from my own activities should start with : "grâce à la
pub[...]"
Current result : "grce à la pub[...]"
What version of the product are you using? On what operating system?
Experienced with different environnements :
- debian + php5.3.6-6
- mac os X + php5.3.6
Please provide any additional information below.
filter_var flag level does not allow display of special chars. Here is a patch
for this.
Original issue reported on code.google.com by [email protected]
on 8 Oct 2011 at 3:44
https://code.google.com/apis/tasks/v1/using.html#setup mentions that it should
contain src/contrib/apiTasksService.php to use the Tasks API - however, it's
not there.
Can you please add it to the svn?
Thanks,
Dennis
Original issue reported on code.google.com by [email protected]
on 12 May 2011 at 1:04
What steps will reproduce the problem?
1.When I try to load the new google plus started project
What is the expected output? What do you see instead?
Warning: require_once(google-api-php-client/src/contrib/apiPlusService.php)
[function.require-once]: failed to open stream: No such file or directory
What version of the product are you using? On what operating system?
Windows, Chrome
Please provide any additional information below.
The file is missing in the NEW Google Plus API Starter Package
Original issue reported on code.google.com by [email protected]
on 15 Sep 2011 at 9:56
$pragmaNoCache is assigned on line 171 of apiCurlIO.php, but $pagmaNoCache
(which is undefined) is used on line 175 and 178.
Original issue reported on code.google.com by [email protected]
on 22 Jun 2011 at 6:50
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
Fatal error: Uncaught exception 'apiException' with message 'Unknown function:
adsense->reports->generate()' in apiServiceResource.php
What version of the product are you using? On what operating system?
PHP 5.3.8
Please provide any additional information below.
Related to this issue:
http://code.google.com/p/google-api-php-client/issues/detail?id=42
The fix in the source did not fix it... the underlying problem is the JSON
encoded method definition cannot be decoded. If you take the JSON code (from
trunk), you can see PHP is unable to decode the JSON...
print_r (json_decode('{"methods": {"generate": {"scopes":
["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"sort":
{"pattern": "(\\+|-)?[a-zA-Z_]+", "repeated": true, "type": "string",
"location": "query"}, "startDate": {"pattern": "\\d{4}-\\d{2}-\\d{2}",
"required": true, "type": "string", "location": "query"}, "endDate":
{"pattern": "\\d{4}-\\d{2}-\\d{2}", "required": true, "type": "string",
"location": "query"}, "locale": {"pattern": "[a-zA-Z_]+", "type": "string",
"location": "query"}, "metric": {"pattern": "[a-zA-Z_]+", "repeated": true,
"type": "string", "location": "query"}, "maxResults": {"format": "int32",
"maximum": "50000", "minimum": "0", "location": "query", "type": "integer"},
"filter": {"pattern": "[a-zA-Z_]+(==|=@).+", "repeated": true, "type":
"string", "location": "query"}, "currency": {"pattern": "[a-zA-Z]+", "type":
"string", "location": "query"}, "startIndex": {"format": "int32", "maximum":
"5000", "minimum": "0", "location": "query", "type": "integer"}, "dimension":
{"pattern": "[a-zA-Z_]+", "repeated": true, "type": "string", "location":
"query"}}, "id": "adsense.reports.generate", "httpMethod": "GET", "path":
"reports", "response": {"$ref": "AdsenseReportsGenerateResponse"}}}}', true));
json_last_error();
It gives a json last error of 4, which is JSON_ERROR_SYNTAX.
Original issue reported on code.google.com by [email protected]
on 14 Dec 2011 at 11:38
Samples for the AdSense Management API
Original issue reported on code.google.com by [email protected]
on 27 Oct 2011 at 7:00
Attachments:
What steps will reproduce the problem?
1. Initialize and create a valid apiClient
2. Initialize an apiAnalyticsService object with the client object
3. The notice in the subject should be present
What is the expected output? What do you see instead?
I expect an apiAnalyticsService object with a subset of different objects,
ManagementWebpropertiesServiceResource, ManagementSegmentsServiceResource, etc.
Instead, and I believe this is due to the undefined index error, none of these
objects are present
What version of the product are you using? On what operating system?
r284
Please provide any additional information below.
I believe the bug is in apiAnalyticsService.php in the constructor. A long
json object is sent to the ManagmentServiceResource constructor as the
"resource". The constructor expects a 'method' index, but instead it receives
an object with a number of resources with their own 'method' indexes, which I
don't think it handles properly.
Original issue reported on code.google.com by davidcroda
on 14 Dec 2011 at 3:44
in apiClient.php :
set_include_path("$cwd" . PATH_SEPARATOR . ":" . get_include_path());
which breaks include_path because of PATH_SEPARATOR . ":"
The good instruction should be :
set_include_path("$cwd" . PATH_SEPARATOR . get_include_path());
Original issue reported on code.google.com by [email protected]
on 5 Nov 2011 at 10:15
What steps will reproduce the problem?
1. Set up apiClient using class in apiOAuth as auth class in config
2. Run authentication with redirect set to authorization method.
3. Upon receiving authorization code the authenticate method will try to make
the exchange for an access token.
4. Because the access_type is not set, no refresh_token is sent back causing a
validation error on setAccessToken()
What is the expected output? What do you see instead?
After creating the Auth url (auth/apiOAuth2 #91) for the authorization grant
and getting back the parameter "code" the authenticate method should request an
access token. When successful the setAccessToken in apiOAuth2 class should run
correctly but throws apiAuthException("Invalid token format") instead.
What version of the product are you using? On what operating system?
google-api-php-client 0.47
PHP 5.3.6
Fedora 2.6.35.14-96.fc14.i686.PAE
Please provide any additional information below.
According to the documents
(http://code.google.com/p/google-api-php-client/wiki/OAuth2), refresh_token
only returns when when access_type is set to offline on authorization. But the
setAccessToken method in apiOAuth2 throws an exception when refresh_token is
not set (auth/apiOAuth2 #107).
Original issue reported on code.google.com by [email protected]
on 10 Dec 2011 at 1:40
What steps will reproduce the problem?
1.I need to set up authorisation to pass data to a google docs spreadsheet.
2.I have all the code completed and working with simple username and password
authorisation to my personal gmail. When I bring it over to the internal google
hosting I need further authorisation.
3.what steps do I need to take to get my php code authorised?
What is the expected output? What do you see instead?
It is very important for this project that the user is not asked to input
anything, so the script has to run in the background. So basally the php file
is holding the varibles - then passing them to a spreadsheet for further
evaluation.
What version of the product are you using? On what operating system?
I have developed an elearning project with smartbuilder and php. This will be
hosted on the google server for internal use only.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 18 Sep 2011 at 4:29
The implementation of the Countable interface in apiModel class should be done
this way (based on r240) :
public function count()
{
if (null === $this->items || 0 == ($nbItems = count($this->items)))
{
return 1;
}
return $nbItems;
}
I guess the apiModel class should be made abstract as well !
Original issue reported on code.google.com by [email protected]
on 10 Oct 2011 at 11:11
Good day. I've edited: client id, client secret and setredirecturi. Tried the
example, google asked me permission to share info, and then i recieve error on
callback - Error calling
https://www.googleapis.com/latitude/v1/currentLocation?alt=json: (403) Access
Not Configured
Original issue reported on code.google.com by [email protected]
on 9 Oct 2011 at 1:05
Hello,
I have 4 task lists on my flx.me google apps domain but I can't retrieve the
lists. It only receives the list "me's list" (which reflect's the username
"me"). However, when using a task list on gmail, it works fine and retrieves
all lists.
Code used:
<?php
//load libs
require_once "include/google-api-php-client/src/apiClient.php";
require_once "include/google-api-php-client/src/contrib/apiTasksService.php";
//load api
$apiClient = new apiClient();
$service = new apiTasksService($apiClient);
//authenticate
if (isset($_SESSION['oauth_access_token'])) {
$apiClient->setAccessToken($_SESSION['oauth_access_token']);
} else {
$token = $apiClient->authenticate();
$_SESSION['oauth_access_token'] = $token;
}
//get list
$taskLists = $service->listTasklists();
foreach ($taskLists['items'] as $taskList) {
echo $taskList['title'] . " - " . $taskList['id'] . "<br />";
}
?>
How can I fix this?
Thanks,
Dennis
Original issue reported on code.google.com by [email protected]
on 13 May 2011 at 10:25
According to this blog entry
(http://googlecode.blogspot.com/2011/10/upcoming-changes-to-oauth-20-endpoint.ht
ml), if you do not specify a value for approval_prompt or if you set it to
"auto", the service should not ask the user to approve more than once.
Using the PHP client, doing so gives me:
Error fetching OAuth2 access token, message: 'redirect_uri_mismatch'
Original issue reported on code.google.com by [email protected]
on 12 Dec 2011 at 11:59
555
Original issue reported on code.google.com by [email protected]
on 16 Sep 2011 at 2:59
Attachments:
What steps will reproduce the problem?
1. Go to http://localhost/google-api-php-client/examples/buzz
2. Click on the Get the consumption stream or Get the public stream links
What is the expected output? What do you see instead?
The expected output is the consumption stream or the public stream instead
there is the following error:
Notice: Undefined variable: client in
/var/www/google-api-php-client/examples/buzz/getConsumptionStream.php on line
33 Call Stack: 0.0003 629104 1. {main}()
/var/www/google-api-php-client/examples/buzz/getConsumptionStream.php:0 Fatal
error: Call to a member function setApplicationName() on a non-object in
/var/www/google-api-php-client/examples/buzz/getConsumptionStream.php on line
33 Call Stack: 0.0003 629104 1. {main}()
/var/www/google-api-php-client/examples/buzz/getConsumptionStream.php:0
What version of the product are you using? On what operating system?
google-api-php-client-0.4.4.tar.gz
Ubuntu 10.04
Please provide any additional information below.
I change the name of the variable on line 33 from $client to $apiClient that is
what is defined on line 32 and everything works.
Original issue reported on code.google.com by [email protected]
on 15 Sep 2011 at 8:29
Support for the new Search API for Shopping:
http://code.google.com/apis/shopping/search/
Original issue reported on code.google.com by [email protected]
on 14 Jan 2011 at 10:44
single quotes for javascript double for html is a better practice, also an id
is a uniqe html attribute so you can't create more than one. but class is not.
Original issue reported on code.google.com by [email protected]
on 14 Sep 2011 at 10:14
Attachments:
Latitude also requires the postBody to be set under the data key.
Original issue reported on code.google.com by [email protected]
on 18 Aug 2011 at 8:27
Attachments:
What steps will reproduce the problem?
1. Set 'use_objects' => true in your config
2. Call e.g. $query = $plus->comments->listComments("INSERT_ACTIVITY_ID")
What is the expected output? What do you see instead?
$query is an Object of the type CommentFeed, that's OK. However, what I expect
is that $query->items is an array of Comment objects. Instead, it is an array
of arrays. So after all, only the main element is returned as an object, all
children stay unchanged (although corresponding objects do exist!)
What version of the product are you using? On what operating system?
Version 0.4.5
Please provide any additional information below.
One possible solution for this issue which comes into my mind is overriding the
apiModel constructor in the classes which may have children of another object
type and convert them to objects afterwards.
Here is an example based on the CommentFeed object:
class CommentFeed extends apiModel {
...
public function __construct() {
parent::__construct(func_get_arg(0));
foreach ($this->items as $key => $item) {
$this->items[$key] = new Comment($item);
}
}
...
}
It's probably not best-practice, but it works. If the same change would be made
to the other objects as well, we would have fully object-oriented results when
'use_objects' is set to true.
Original issue reported on code.google.com by [email protected]
on 5 Oct 2011 at 1:27
While testing the given Tasks API example, I found a little bug into
examples/tasks/index.php line 59
The 'name' property doesn't exist.
print "<h3>{$list['name']}</h3>";
'title' property should be used instead
print "<h3>{$list['title']}</h3>";
Great PHP CL! thanks to all of you guys.
Hugo
Original issue reported on code.google.com by [email protected]
on 6 Nov 2011 at 6:13
The latitude API has the following in the discovery document:
"schemas": {
"LatitudeCurrentlocationResourceJson": {
"$ref": "Location"
},
When the service class is generated with this,
LatitudeCurrentlocationResourceJson should extend the Location class.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2011 at 10:40
Okay, I used the sample code to dump my profile. But every time I have a
different page try and loud my profile I have to reauthorize it to use my
google account. I figured this would be a one time auth process. My code is
literally the same on each page. Pages being index.php or profile.php. The
Domain is the same every time.
So in summary: if I load http://www.mydomain.com it takes me to that connect me
button and then we I go to http://wwww.mydomain.com/profile.php I get sent to
the connect me button again. Should that be happening?
$authUrl = $client->createAuthUrl();
print "<a class='login' href='$authUrl'>Connect Me!</a>";
Original issue reported on code.google.com by [email protected]
on 9 Oct 2011 at 8:39
What steps will reproduce the problem?
Just try to run the buzz example.
.../google-api-php-client/examples/buzz/index.php
Then "Get the public stram"
What is the expected output? What do you see instead?
PHP-Error message in getPublicStream.php line 33
What version of the product are you using? On what operating system?
latest version: google-api-php-client-0.4.4.tar.gz.
Please provide any additional information below.
line 33 should be:
$apiClient->setApplicationName(
instead of
$client->setApplicationName(
Original issue reported on code.google.com by [email protected]
on 16 Sep 2011 at 9:24
Patch attached.
Original issue reported on code.google.com by [email protected]
on 15 Jan 2011 at 12:02
What steps will reproduce the problem?
1. I made my first G+ project: create client_id, then starting to connect with
Google Api PHP Client and Starter package.
2. Clicked "Connect Me!" Then "Allow Access"
3. I retured to my landing page, with error msg (see later). I got "code"
params in url.
What is the expected output? What do you see instead?
Error msg was: "SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed"
What version of the product are you using? On what operating system?
I am using "google-api-php-client" and "google-plus-php-starter" on local wamp
server.
Please provide any additional information below.
"Fatal error: Uncaught exception 'apiIOException' with message ' in
C:\wamp\www\google-plus-php-starter\google-api-php-client\src\io\apiCurlIO.php
on line 122"
Br,
kP.
Original issue reported on code.google.com by [email protected]
on 15 Sep 2011 at 9:29
What steps will reproduce the problem?
1. Run the sample : http://code.google.com/p/google-api-php-client/ on a
Chromium browser
2. Hebrew post stream is displayed in wrong encoding (unreadable)
3. Switching to Firefox 6, everything displays fine. (without changing the code)
What is the expected output? What do you see instead?
Hebrew text in the stream of posts
What version of the product are you using? On what operating system?
Chromium 12.0.742.112 (90304) Ubuntu 11.04 64bit
Please provide any additional information below.
Original issue reported on code.google.com by nadavkav
on 29 Sep 2011 at 9:15
On BecomingAContributor page, mailing list link points to Google Buzz API list.
I would expect that it would point here:
https://groups.google.com/forum/#!forum/google-api-php-client
Original issue reported on code.google.com by [email protected]
on 9 Sep 2011 at 11:47
It would be nice if the library had a method for programmatically revoking the
refresh_token. It's not terribly difficult to do, but it seems like something
that should be handled by the library...
This is how we are doing it currently:
$ch = curl_init ('https://accounts.google.com/o/oauth2/revoke');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('token' => $token));
curl_exec($ch);
Original issue reported on code.google.com by [email protected]
on 14 Dec 2011 at 7:02
Would like to see sample code for the following:
PHP Sample for Google Affiliate Network
Which Google API and version (e.g. Google Calendar Data API version 2)?
Google Affiliate Network API v1beta1, Events and Order Detail
What format (e.g. JSON, Atom)?
JSON
What Authentation (e.g. OAuth, OAuth 2, ClientLogin)?
Simple API Access (using API key for server apps (with IP locking))
External references, such as API reference guide?
http://code.google.com/apis/gan/index.html
http://code.google.com/apis/gan/overview.html
Please provide any additional information below.
Looking to get Events and Order Detail from the Google Affiliate Network API
using Simple API Access (no OAuth) via PHP.
Original issue reported on code.google.com by [email protected]
on 16 Dec 2011 at 2:55
The easiest vary and the most commen way is to distribute a package like this
via PEAR.
This would be a very nice feature.
Original issue reported on code.google.com by [email protected]
on 9 Sep 2011 at 6:44
The library is currently broken into the following structure:
google-api-php-client
- test
- examples
- src
-- auth
-- service
-- io
-- auth
-- cache
-- services
-- external
-- apiClient.php
-- config.php
Here's the proposed structure. This has a more obvious call-to-action when
developers first unzip the client library. They will first see the php files
they need to configure, and the apiClient.
google-api-php-client:
- test
- examples
- config.php
- apiClient.php
- base
-- auth
-- service
-- io
-- auth
-- cache
-- services
-- external
Original issue reported on code.google.com by [email protected]
on 17 Aug 2011 at 1:46
We can limit the number of requests per second per user for an API to prevent
individual users from eating up API quota.
Documentation. https://code.google.com/apis/console-help/#PreventMonopolizing
Simply need to add the userIp query parameter.
Original issue reported on code.google.com by [email protected]
on 23 Sep 2011 at 1:33
I get the following error:
Warning: strlen() expects parameter 1 to be string, array given in
/var/www/library/google/src/io/apiCurlIO.php on line 91
Original issue reported on code.google.com by [email protected]
on 21 Jul 2011 at 10:35
Latiutude API gives 401 When trying to get current location or anything
What steps will reproduce the problem?
1.I'm authorized with oAuth normally for ( granularity=best & locaiton=current)
2.I'm redirected back to my site now when I try to fetch the currentlocation I
get 401 Invalid credentials
What is the expected output? What do you see instead?
- the expected output is to get the location not 401 Error
What version of the product are you using? On what operating system?
v1 with any of the Client Libs provided by google
Please provide any additional information below.
This is my Code both give the same error
<-------------- CODE 1 --------------->
<?php
ini_set("display_errors",1);
error_reporting(E_ALL);
session_start();
// set_include_path('/home/library/'.get_include_path());
require_once 'Zend/Oauth/Consumer.php';
$oauthOptions = array(
'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER,
'version' => '1.0',
'consumerKey' => '################My Key###########',
'consumerSecret' => '################My Secret########',
'signatureMethod' => 'HMAC-SHA1',
'requestTokenUrl' => 'https://www.google.com/accounts/OAuthGetRequestToken',
'userAuthorizationUrl' => 'https://www.google.com/latitude/apps/OAuthAuthorizeToken',
'accessTokenUrl' => 'https://www.google.com/accounts/OAuthGetAccessToken',
'callbackUrl' => 'http://web2era.com/googleapi/examples/',
);
$consumer = new Zend_Oauth_Consumer($oauthOptions);
if (!isset($_SESSION['ACCESS_TOKEN_GOOGLE'])) {
if (!empty($_GET)) {
$token = $consumer->getAccessToken($_GET, unserialize($_SESSION['REQUEST_TOKEN_GOOGLE']));
$_SESSION['ACCESS_TOKEN_GOOGLE'] = serialize($token);
} else {
$token = $consumer->getRequestToken(array('scope'=>'https://www.googleapis.com/auth/latitude'));
$_SESSION['REQUEST_TOKEN_GOOGLE'] = serialize($token);
$customparams = array('domain' => 'web2era.com', 'granularity' => 'best', 'location' => 'current');
$consumer->redirect($customparams );
exit;
}
} else {
$token = unserialize($_SESSION['ACCESS_TOKEN_GOOGLE']);
//$_SESSION['ACCESS_TOKEN_GOOGLE'] = null; // do not use, we want to keep the access token
}
$client = $token->getHttpClient($oauthOptions);
// I Use this
$client->setUri('https://www.googleapis.com/latitude/v1/currentLocation?granular
ity=best');
// Other times I use this
$client->setUri('https://www.googleapis.com/latitude/v1/currentLocation');
$client->addParameterGet("granularity","best");
$client->setMethod(Zend_Http_Client::GET);
$response = $client->request();
$body = $response->getBody();
header('Content-Type: ' . $response->getHeader('Content-Type'));
echo $response->getBody();
<-------------- Another Code That doesn't work tooo ------------->
session_start();
ini_set("display_errors","on");
require_once '../src/apiClient.php';
require_once '../src/contrib/apiBuzzService.php';
require_once '../src/contrib/apiLatitudeService.php';
global $apiConfig;
$apiConfig['oauth2_client_id'] = '######### Client ID ##########';
$apiConfig['oauth2_client_secret'] = '####### Secret #######';
// The oauth2_redirect_uri is typically the path to where you host this PHP
file.
$apiConfig['oauth2_redirect_uri'] = 'http://web2era.com/googleapi/examples';
$apiconfig['authClass'] = 'apiOAuth2';
$apiClient = new apiClient();
$latitude = new apiLatitudeService($apiClient);
$apiClient->discover("latitude", "v1");
$latitude->setVersion("v1");
if (isset($_SESSION['oauth_access_token'])) {
$apiClient->setAccessToken($_SESSION['oauth_access_token']);
} else {
$token = $apiClient->authenticate();
$_SESSION['oauth_access_token'] = $token;
$apiClient->setAccessToken($_SESSION['oauth_access_token']);
}
$latitude1 = $latitude->getCurrentLocation('city');
echo "<pre>";
print_r($latitude1);
echo "</pre>";
echo $latitude1;
////
//// Notice the (almost) same code Works perfectly for Buzz
////
Original issue reported on code.google.com by shehabic
on 18 Jun 2011 at 1:37
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.