Getting started with Google API and oAuth
I'm working on a project that requires the user to log in - but I want to use their Google Account as their Login identity.
I'm using this example: http://www.ioncannon.net/programming/1443/google-oauth-for-installed-apps-php-example/
To get me started, and I've managed to request an Authorize Token and use that to get an access token.
However, when I reach the very last stage of oAuth (Described as "Stage 5" in the Tutorial) I receive this error from the CURL execution:
Invalid request URIInvalid request URI
I am using the feed: https://www.google.com/m8/feeds/
What I am trying to achieve here: I simply want the user to log-in with their Google Account, and use their firstname/lastname/avatar from their Google Account on the website. Similar to using Twitter/Facebook to make contribution on a website (like commenting) without having to sign up as a m开发者_C百科ember for just that website.
Add this to the scope - https://www.googleapis.com/auth/userinfo.profile
and request information from here - https://www.googleapis.com/oauth2/v1/userinfo?alt=json
精彩评论