1
从github下载PHP包装器(https://github.com/laposta/laposta-api-php)后,我在WordPress上运行下面的代码时得到一个空白响应。Laposta API - 获取订阅者合计
API在PHP文件中使用时返回正确的数据。
我敢肯定,这是我的一个简单的错误,任何人都可以给我一个指针?我使用了API文档和提供的示例,所以不太确定为什么这不能正常工作。
require_once(get_stylesheet_directory_uri() . '/assets/laposta/lib/Laposta.php');
Laposta::setApiKey("MY_API_KEY");
Laposta::setHttpsDisableVerifyPeer(true);
$list = new Laposta_List();
$result = $list->get("MY_LIST_ID");
$members = $result['list']['members']['active'];