Gabby Tee - 2013-04-05 21:43:18
Hello,
I'm currently using this class, which I find wonderful, due to its lightweight, but I'm having this issue while validating with Google.
Once the user is authenticated and the code is obtained from Google, method getUserProfile() doesn't return any information.
My google.php file is this (w/o personal keys, of course):
<?php
include "socialmedia_oauth_connect.php";
$oauth = new socialmedia_oauth_connect();
$oauth->provider="Google";
$oauth->client_id = "##########.apps.googleusercontent.com";
$oauth->client_secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$oauth->scope="https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.me https://www.google.com/m8/feeds";
$oauth->redirect_uri ="http://localhost/tests/oAuth/google.php";
$oauth->Initialize();
$code = ($_REQUEST["code"]) ? ($_REQUEST["code"]) : "";
if(empty($code)) {
$oauth->Authorize();
}else{
$oauth->code = $code;
$getData = json_decode($oauth->getUserProfile());
$oauth->debugJson($getData);
/* redirect here */
}
I'll be waiting for your answer, because I'm trying to use your superb work as soon as possible.