PHP Classes

Not working for me

Recommend this page to a friend!

      PHP oAuth2 lightweight wrapper  >  All threads  >  Not working for me  >  (Un) Subscribe thread alerts  
Subject:Not working for me
Summary:After validating with Google, doesn't show user profile
Messages:3
Author:Gabby Tee
Date:2013-04-05 21:43:18
Update:2013-09-23 19:32:11
 

  1. Not working for me   Reply   Report abuse  
Picture of Gabby Tee 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.

  2. Re: Not working for me   Reply   Report abuse  
Picture of Giri Raj Giri Raj - 2013-06-28 10:03:03 - In reply to message 1 from Gabby Tee
Hi,

Very sorry for delay response.

Still do you have facing the same issue or did you find any solution for this?

- Giriraj

  3. Re: Not working for me   Reply   Report abuse  
Picture of Alexander Leal Alexander Leal - 2013-09-23 19:32:11 - In reply to message 2 from Giri Raj
Not working for me too.

I have the same problem.

How can I fix this?