2013-02-21 125 views
1

我在我的網站上集成AWeber但我發現問題並且必須說文檔不太清楚。集成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上做了帳戶,在那裏我找不到這些憑據。

回答

1

當您註冊開發者帳戶和「創建和應用」時,消費者密鑰和祕密由https://labs.aweber.com網站發佈。然後使用這兩個值的API庫啓動授權過程(遵循OAuth 1.0a標準)。該過程將爲您提供訪問密鑰和祕密。

最後,你使用這些2對鍵讓自己的應用在每次請求數據時進行身份驗證的API:

  • 消費者密鑰和消費者祕密確定您的應用程序
  • 快捷鍵和訪問祕密說給API,一旦應用程序驗證自身「我登錄到這個特定AWeber帳戶」

,您可以使用庫來獲取帳戶ID和任何你想要的列表中適當的名單ID訪問。

AWeber有一個很好的教程,包括示例代碼,可以引導您瞭解他們的OAuth的過程在這裏:

https://labs.aweber.com/getting_started/private#private_connect_oauth

0

您需要在Aweber上創建一個開發者帳戶才能獲取這些帳戶。

轉到:https://labs.aweber.com/

然後創建一個應用程序來獲取這些值。