[orkut-developer] Stuck in Authorization loop

2010-09-22 Thread Dennis
I am trying to port the library over to my CodeIgniter application and
when I navigate to the url to access the orkut auth, I am sent over to
google to grant my application access to my orkut account, but after
accepting it keeps sending me back to step 1 with google to authorize
my application to gain access.

My CI Library

require_once Orkut/globals.php;
class Orkut_api {
public $orkut_api;
public $CI;

public function __construct(array $orkut_params) {
$this-orkut_api = new 
Orkut($orkut_params['consumer_key'],
$orkut_params['consumer_secret']);
$this-CI = get_instance();
}

public function auth() {
try {
if($this-orkut_api-login()) {
return WOOT;
}
}
catch(Exception $e) {

$this-CI-session-unset_userdata('oauth_token');
GenericError::stop(1, Can't 
authenticate an Orkut);
}
}
}

Any reason why I would be stuck in a loop?

-- 
You received this message because you are subscribed to the Google Groups 
orkut Developer Forum group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



Re: [orkut-developer] Stuck in Authorization loop

2010-09-22 Thread Robson Dantas
When authenticated, your access token is stored in a session. After signing
in, for some reason, if the session is not created, you will get redirected
again to Google's authentication website. You need to check if this session
is being created, in order to avoid this.

Open the test and check how the session is being handled. Another solution
is storing it on cookies, like the java library is doing. But again, it
depends how your environment is configured.

-Robson Dantas

2010/9/22 Dennis dennismonsew...@gmail.com

 I am trying to port the library over to my CodeIgniter application and
 when I navigate to the url to access the orkut auth, I am sent over to
 google to grant my application access to my orkut account, but after
 accepting it keeps sending me back to step 1 with google to authorize
 my application to gain access.

 My CI Library

 require_once Orkut/globals.php;
class Orkut_api {
public $orkut_api;
public $CI;

public function __construct(array $orkut_params) {
$this-orkut_api = new
 Orkut($orkut_params['consumer_key'],
 $orkut_params['consumer_secret']);
$this-CI = get_instance();
}

public function auth() {
try {
if($this-orkut_api-login()) {
return WOOT;
}
}
catch(Exception $e) {

  $this-CI-session-unset_userdata('oauth_token');
GenericError::stop(1, Can't
 authenticate an Orkut);
}
}
}

 Any reason why I would be stuck in a loop?

 --
 You received this message because you are subscribed to the Google Groups
 orkut Developer Forum group.
 To post to this group, send email to opensocial-or...@googlegroups.com.
 To unsubscribe from this group, send email to
 opensocial-orkut+unsubscr...@googlegroups.comopensocial-orkut%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/opensocial-orkut?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
orkut Developer Forum group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



Re: [orkut-developer] Stuck in Authorization loop

2010-09-22 Thread Dennis Monsewicz
Thanks! I actually got it working, but am getting some odd error, but I
think its because I am porting this lib over into a CodeIgniter Lib and
therefore its just not working.

On Wed, Sep 22, 2010 at 1:23 PM, Robson Dantas biu.dan...@gmail.com wrote:

 When authenticated, your access token is stored in a session. After signing
 in, for some reason, if the session is not created, you will get redirected
 again to Google's authentication website. You need to check if this session
 is being created, in order to avoid this.

 Open the test and check how the session is being handled. Another solution
 is storing it on cookies, like the java library is doing. But again, it
 depends how your environment is configured.

 -Robson Dantas

 2010/9/22 Dennis dennismonsew...@gmail.com

 I am trying to port the library over to my CodeIgniter application and
 when I navigate to the url to access the orkut auth, I am sent over to
 google to grant my application access to my orkut account, but after
 accepting it keeps sending me back to step 1 with google to authorize
 my application to gain access.

 My CI Library

 require_once Orkut/globals.php;
class Orkut_api {
public $orkut_api;
public $CI;

public function __construct(array $orkut_params) {
$this-orkut_api = new
 Orkut($orkut_params['consumer_key'],
 $orkut_params['consumer_secret']);
$this-CI = get_instance();
}

public function auth() {
try {
if($this-orkut_api-login()) {
return WOOT;
}
}
catch(Exception $e) {

  $this-CI-session-unset_userdata('oauth_token');
GenericError::stop(1, Can't
 authenticate an Orkut);
}
}
}

 Any reason why I would be stuck in a loop?

 --
 You received this message because you are subscribed to the Google Groups
 orkut Developer Forum group.
 To post to this group, send email to opensocial-or...@googlegroups.com.
 To unsubscribe from this group, send email to
 opensocial-orkut+unsubscr...@googlegroups.comopensocial-orkut%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/opensocial-orkut?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 orkut Developer Forum group.
 To post to this group, send email to opensocial-or...@googlegroups.com.
 To unsubscribe from this group, send email to
 opensocial-orkut+unsubscr...@googlegroups.comopensocial-orkut%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/opensocial-orkut?hl=en.




-- 
Dennis Monsewicz Jr.
Web Designer/Developer
Cell: (256) 339-8716
www.dennismonsewicz.com

-- 
You received this message because you are subscribed to the Google Groups 
orkut Developer Forum group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.