google-api-php-client

How to get the user 'contactid' using google API using PHP

一个人想着一个人 提交于 2020-01-11 11:30:04
问题 I am trying to fetch user contacts with all user details uaing the google API 3.0. I am able to get the JSON response with the details of the user. $url = 'https://www.google.com/m8/feeds/contacts/default/full?max-results='.$max_results.'&alt=json&v=3.0&oauth_token='.$accesstoken; The result is [entry] => Array ( [0] => Array ( [id] => Array ( [$t] => http://www.google.com/m8/feeds/contacts/sfdhitdf1%40gmail.com/base/1 ) [gd$etag] => "RXc7fTVSLit7I2A9XRZaEkoLRAw." [updated] => Array ( [$t] =>

Google Calendar API batch request PHP

半城伤御伤魂 提交于 2020-01-10 03:17:07
问题 i am trying to send a bunch of events via an Batch Request to Google Calendar. But i cant figur out how to do. https://developers.google.com/google-apps/calendar/batch doesnt help me. require_once 'google-api-php-client/src/Google_Client.php'; require_once 'google-api-php-client/src/contrib/Google_CalendarService.php'; $client = new Google_Client(); $client->setUseBatch(true); $batch = new Google_BatchRequest(); $uri = 'http://www.google.com/calendar/feeds/default/private/full/batch';

Automatically refresh token using google drive api with php script

会有一股神秘感。 提交于 2020-01-09 03:19:26
问题 I followed again THIS TUTORIAL to upload a file on Google Drive with php, directly from my REMOTE SERVER: so I have created new API Project from Google API Console, enabled Drive API service, requested OAuth Client ID and Client Secret, wrote them in a script, then upload it together with Google APIs Client Library for PHP folder to this http://www.MYSERVER.com/script1.php, to retrieve Auth code: <?php require_once 'google-api-php-client/src/Google_Client.php'; require_once 'google-api-php

Which email to use in Google Service Account API

北城余情 提交于 2020-01-07 09:02:22
问题 Following this Google Tutorial : https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-php And using this PHP library : https://github.com/wanze/Google-Analytics-API-PHP I have a little problem. I just don't find the email to use as described in the tutorial. I think the API interface has changed, and the tutorial is old. I have created my project, activate Analytics API, and create a "Service account". It generates an email, but not in projectId-uniqueId

can you tell me what's wrong with this google drive API call function in PHP

巧了我就是萌 提交于 2020-01-06 07:09:26
问题 I've got this code to run and fetch images from my drive. But i'm running into a problem every time I run this code. function listF() { $result = array(); $tok = array(); $nextPageToken = NULL; do { try { $parameters = array(); if ($nextPageToken) { $parameters['pageToken'] = $nextPageToken; $parameters['q'] = "mimeType='image/jpeg' or mimeType='image/png'"; } $files = $this->service->files->listFiles($parameters); $tok[] = $nextPageToken; $result = array_merge($tok, $result, $files->getFiles

Google Calendar API V3 how do I add an attendee to a list of existing attendees?

跟風遠走 提交于 2020-01-06 01:55:31
问题 I already have an $event->attendees with some existing attendees. I would like to add new EventAttendee to this event but it looks like my code crushes the old attendees list. I try $attendeesx= $event->getAttendees(); $attendees = array_push($attendeesx,$newattendee); $event->attendees = $attendees; $service->events->update(MyCalendar, $event->getID(), $event); not working. Anyway I would like to add, not replace the old list by a new one. Any clue? What is additionalGuest? What is it made

Cannot see Youtube Content ID API to enable

丶灬走出姿态 提交于 2020-01-05 04:20:27
问题 I got error while trying to update Youtube Video asset Error calling GET https://www.googleapis.com/youtube/partner/v1/contentOwners?fetchMine=true: (403) Access Not Configured. The API (Youtube Content ID API) is not enabled for your project. Please use the Google Developers Console to update your configuration. But I cannot find the Youtube Content ID API in my dev console. I'm using a Youtube Account with a channel that is Youtube Partner. What's wrong with that? :( 回答1: You don't see it

Youtube video processing status stuck on “processing” after an upload with the google api php client

萝らか妹 提交于 2020-01-05 04:16:15
问题 I have a problem uploading a video on my youtube account using the google api php client 0.6.4 The upload seems ok but the video status is stuck on "processing" Array ( [status] => Array ( [uploadStatus] => uploaded [privacyStatus] => public [license] => youtube [embeddable] => 1 [publicStatsViewable] => 1 ) [processingDetails] => Array ( [processingStatus] => processing [fileDetailsAvailability] => inProgress [processingIssuesAvailability] => inProgress [tagSuggestionsAvailability] =>

Problems with the Google API PHP simple-query example

戏子无情 提交于 2020-01-05 04:09:07
问题 I am trying to get the Google simple-query example (off GitHub) working, unfortunately with a definite lack of success ... all I get is an exit code of 255. I established that the problem was in the call to the Google Server, so added an exception handler to the code. The program now looks like this: <?php /* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a

Google oAuth: redirect_uri_mismatch

99封情书 提交于 2020-01-04 14:38:32
问题 We are getting a "redirect_uri_mismatch" error when attempting to get an oAuth token from Google: [client 127.0.0.1:49892] {\n "error" : "redirect_uri_mismatch"\n}, referer: `http://localhost/oAuth/chess-login.html` There are two files being used: chess-login.html, and plus.php (code below). The Google API has the following URI: http://localhost/oAuth/chess-login.html Can anyone point to a solution? plus.php: <?php $client_id = "XXX.apps.googleusercontent.com"; //your client id $client_secret