我試圖用這個reddit的PHP API包裝 https://github.com/jcleblanc/reddit-php-sdkreddit的API SDK無所事事,返回null
要提交後到reddit。
該代碼看起來很簡單,我知道我已配置正確。
當我加載頁面,它會去reddit,驗證我的帳戶,然後送我回來。但不發表帖子。如果我刷新,沒有任何反應。如果我刪除會話cookie,它會再次執行驗證確認,但不會提交帖子。
我設置了api,得到了正確的應用程序ID和祕密,重定向uri是正確的,它回到了我的頁面。
<?php
echo '<h1>Test</h1>';
require_once("reddit.php");
$reddit = new reddit();
$title = "Test submission Google";
$link = "http://google.com/";
$subreddit = "truepixelart";
$response = $reddit->createStory($title, $link, $subreddit);
var_dump($response);
?>
轉儲剛剛返回null,所以我不知道去哪裏找
我知道這是一種模糊的,但任何想法?