我正在我的网站上集成 AWeber 但我发现问题并且必须说文档不太清楚 .
<?php
require_once('aweber_api/aweber_api.php');
$consumerKey = '***'; # put your credentials here
$consumerSecret = '***'; # put your credentials here
$accessKey = '***'; # put your credentials here
$accessSecret = '***'; # put your credentials here
$account_id = '***'; # put the Account ID here
$list_id = '***'; # put the List ID here
$aweber = new AWeberAPI($consumerKey, $consumerSecret);
但我不知道,从哪里得到 aweber_api/aweber_api.php
和 $consumerKey
, $consumerSecret
, $accessKey
, $list_id
, $account_id
和 $accessSecret
. 我在AWeber.com帐号,在那里我找不到这些凭据 .
2 回答
您需要在Aweber上创建一个开发者帐户才能获得这些帐户 .
转到:https://labs.aweber.com/
然后创建一个应用程序来获取这些值 .
当您注册开发者帐户和"create and app"时,https://labs.aweber.com网站会发布消费者密钥和密钥 . 然后,您可以使用带有这两个值的API库启动授权过程(遵循OAuth 1.0a标准) . 该过程将为您提供访问密钥和密钥 .
最后,您使用这两对密钥让您的应用在每次请求数据时都对API进行身份验证:
消费者密钥和消费者密钥识别您的应用程序
访问密钥和访问密钥对API说,"I am logging in to this specific AWeber account"
应用程序自身进行身份验证后,您可以使用该库来获取您要访问的列表的帐户ID和相应的列表ID .
AWeber有一个很好的教程,包括示例代码,可以引导您完成OAuth流程:
https://labs.aweber.com/getting_started/private#private_connect_oauth