reddit-php-sdk
reddit-php-sdk copied to clipboard
403 - Request forbidden by administrative rules
Hello,
I was using this sdk and until now it was working. Congrats for your work!
But recently, I noticed that it cannot post any more to Reddit and I get this error instead:
403 - Request forbidden by administrative rules
Can you help me please with this? Thank you very much.
Regards, Szabi.
@sfatfarma I recently made a call to the api for the first time (i think) but I get the 403 error, have you been able to fix it? @jcleblanc any ideas, has something gone wrong?
Thanks KishanV
Hello @Reaper03 No fix yet.
My code:
try
{
require_once(dirname(__FILE__) . "/res/reddit-sdk/reddit.php");
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$reddit = new reddit($app_id, $app_secret, $actual_link, false);
if($reddit == false)
{
//fail
return;
}
}
catch(Exception $e)
{
//fail again
return;
}
try {
$response = $reddit->createStory($post_template, $post_link, $subreddit);
if($response === null || $response === false)
{
//fail
return;
}
}
catch (Exception $e) {
//fail once again
return;
}
Oh shame thanks for the reply though, if u want I can direct you to another PHP wrapper that should work if not check out Praw (python)