Cardinal177
unread,Apr 18, 2012, 6:42:47 PM4/18/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-ca...@googlegroups.com
Hi All,
I configured a Web Application with a redirect page. I'm starting out with the calendar example simple.php. I filled in my ClientID,
ClientSecret, RedirectUrl, and API Key (necessary?), but it appears
getAccessToken never returns a token, thus skipping over the call to
listCalendarList().
I thought the problem might be a OAuth2 one, so I worked through the OAuth2 for Web Server Apps tutorial and I got an initial call to oauth2 auth URL to go to a PHP redirect page. In my redirect page I put in an HTML Form that takes 'code' from Google (via PHP) and with some hidden INPUT tags, is able to submit the form variable to the oauth2 token page, and low and behold, I get an access token in a json stream in a browser window. At least it appears my account is set up properly.
But sample.php hides all the OAuth2 stuff under the covers, right? How does getAccessToken in sample.php get the access_token? Does the redirect page somehow post it to sample.php?
Maybe if
anyone has a sample redirect page (PHP/JS), could they send it along? Then maybe I can get sample.php to work properly.
Much appreciated for any advice!
Corey.