|
|
 Schenk Philipp | 2012-11-14 13:26:36 |
I've installed PHP OAuth APi and manage to also log on to Google. In https://code.google.com/apis/console requests counts one) high.
How can I get now to connect with my Google Calendar? Do I have something in login_with_google.php enter, so I can add events to the calendar? |
| |
2. Re: Google-Calendar |
|
Reply |
|
|
| |
3. Re: Google-Calendar |
|
Reply |
|
|
 Schenk Philipp | 2012-11-14 21:03:56 - In reply to message 2 from Manuel Lemos |
Where can I write purely this line?
In "login_with_google.php"?
At: $ client-> scope = .....
Or at: $ success = $ client-> CallAPI (.......
It looks as if I'm on the right track, but still not quite there. |
| |
4. Re: Google-Calendar |
|
Reply |
|
|
 Manuel Lemos | 2012-11-14 23:12:07 - In reply to message 3 from Schenk Philipp |
| It is the $client->scope variable that you need to assign of of the two possible scope values to access Google Calendar API on behalf of the user. |
| |
5. Re: Google-Calendar |
|
Reply |
|
|
 Schenk Philipp | 2012-11-15 07:41:40 - In reply to message 4 from Manuel Lemos |
This code does not work:
$client-> scope = 'https://www.googleapis.com/auth/calendar'.
'https://www.googleapis.com/auth/userinfo.profile';
Why? What am I doing wrong or where is the mistake? |
| |
6. Re: Google-Calendar |
|
Reply |
|
|
 Manuel Lemos | 2012-11-15 11:08:54 - In reply to message 5 from Schenk Philipp |
| It seems you are missing a space between permissions. |
| |
7. Re: Google-Calendar |
|
Reply |
|
|
 Schenk Philipp | 2012-11-15 20:52:35 - In reply to message 6 from Manuel Lemos |
also with a space it does not work.
have to / auth / calendar made ​​the space.
Https / /: code.google.com / apis / console requests always counts +1. Calendar API # of requests not.
Perhaps correctly so. I do not know. |
| |
8. Re: Google-Calendar |
|
Reply |
|
|
| |
9. Re: Google-Calendar |
|
Reply |
|
|
 Schenk Philipp | 2012-11-17 21:35:32 - In reply to message 8 from Manuel Lemos |
I get a Google Calendar which I have added to my account.
Calendar API # requests then counts each +1.
Ander this point, I add now a new event? |
| |
10. Re: Google-Calendar |
|
Reply |
|
|
 Manuel Lemos | 2012-11-18 07:45:57 - In reply to message 9 from Schenk Philipp |
I am not sure what you are asking.
Do you want to call the API to add a new event to a calendar?
I think you just need to figure the parameters you need to pass and call the right API URL.
Keep in mind that once you get the access token, you do not need to call the API when the user is accessing your site. The user is just needed to authorize the access and later to authorize again if the token is revoked. |
|