2

I've been on this one for the last 2 days...

All I want to do is, with my username and password, access my Google Calendar events/calendars and create, edit or delete them with my PHP web application.

I've looked in the Google API, Zend Framework, OAuth 2.0 with google, etc and there is always a piece of information missing to make it work.

What is the quickest and simplest way, on a shared server to get to access my gcalendar? Is there a class/php function file somewhere that I can simply install in a www.websitename.com/include directory that will not make me want to pull my hair out?

I want to use already made functions like this : updateevent(username, pass, id, calendar, title, details, location, etc);

John Conde
  • 217,595
  • 99
  • 455
  • 496
Joel
  • 895
  • 4
  • 13
  • 33
  • It might help to peruse the source for the Official Google PHP API for Calendar: http://code.google.com/p/google-api-php-client/source/browse/trunk/src/contrib/apiCalendarService.php – Bailey Parker Nov 25 '11 at 05:56

1 Answers1

2

New APIs can be a little scary, especially to programmers who are still somewhat new to a particular platform. Google's Calendar API is very well-documented (like all of them) -- but you just have to read them. It's easy once you get used to it.

http://code.google.com/apis/calendar/v3/using.html

It basically involves this:

  1. Acquire an API key
  2. Include two files in your PHP code
  3. Authenticate (steps up to this point only take a few lines of code)
  4. Do what you need to do!

It's the only official and truly the easiest way to directly work with Google Calendar. What piece of information is still missing?

Matt
  • 22,721
  • 17
  • 71
  • 112
  • Thanks for your answer. I was able to use the OAuth 2.0 system but like I said in my other question (http://stackoverflow.com/questions/8263776/how-to-use-oauth-with-google-calendar-to-access-only-one-calendar) It accesses the calendar of the logged user, not the one from my client... And for the API key, I simply can't get it to work: it the link you give, there is no information on how to make the API key work... Can you tell me what I'm doing wrong (i went to the console, got key, put it in the script and then I get errors)? – Joel Nov 25 '11 at 14:17
  • I posted the precise question / error on this question : http://stackoverflow.com/questions/8270994/how-do-i-use-googles-simple-api-access-key-to-access-google-calendar-info-ph ... can you help me out? It must be a detail I'm missing – Joel Nov 25 '11 at 16:36