a reddit-php-sdk method not outputting anything

Posted by diggpthoo on Stack Overflow See other posts from Stack Overflow or by diggpthoo
Published on 2012-10-10T00:10:25Z Indexed on 2012/11/22 5:01 UTC
Read the original article Hit count: 194

Filed under:
|

I'm trying to learn reddit code and using this https://github.com/jcleblanc/reddit-php-sdk

There's a method in this library $reddit->getUser() which outputs null always. Everything else seems to be working though.

include_once("jcleblanc-reddit-php-sdk-4a4cc32/reddit.php");
$reddit = new reddit("my-username", "my-password");
$userData = $reddit->getUser();
var_dump($userData);

outputs null.

$response = $reddit->getListing("all", 5);
var_dump($response);

outputs what's expected just fine. Then what could be going wrong with $reddit->getUser()?

© Stack Overflow or respective owner

Related posts about php

Related posts about reddit