我正在我的网站上集成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上做了账户,但在那里我找不到这些凭据。
使用者密钥和机密由https://labs.aweber.com当你注册一个开发者帐户并"创建和应用程序"时,你可以访问网站。然后使用带有这两个值的API库来启动授权过程(遵循OAuth 1.0a标准)。该过程将为您提供访问密钥和秘密。
最后,您使用这两对密钥让您的应用程序在每次请求数据时向API进行身份验证:
- 消费者密钥和消费者秘密识别您的应用程序
- 访问密钥和访问秘密对API说:"我正在登录这个特定的AWeber帐户。"
一旦您的应用程序对自己进行了身份验证,您就可以使用库来获取您想要访问的任何列表的帐户ID和适当的列表ID。
AWeber有一个很好的教程,包括示例代码,在这里引导您完成他们的OAuth过程:
https://labs.aweber.com/getting_started/private#private_connect_oauth
您需要在Aweber上创建一个开发人员帐户才能获得这些。
转到:https://labs.aweber.com/
然后创建一个应用程序来获取这些值。