您需要在此注册您的应用程序: https://code.google.com/apis/console#access 然后在应用程序控制台中启用AdWords API。 然后在auth.ini电子邮件,密码,userAgent,developerToken,clientId和clientSecret中配置,最后3个令牌是从应用程序控制台发出的,而且您还需要在此处解除[OAUTH2]。
之后,您需要在examples/201206 /文件夹中创建与init.php相似的文件。
error_reporting(E_STRICT | E_ALL);
define('SRC_PATH', dirname(__FILE__) . '/../../src/');
define('LIB_PATH', 'Google/Api/Ads/AdWords/Lib');
define('UTIL_PATH', 'Google/Api/Ads/Common/Util');
define('AW_UTIL_PATH', 'Google/Api/Ads/AdWords/Util');
define('ADWORDS_VERSION', 'v201206');
// Configure include path
ini_set('include_path', implode(array(
ini_get('include_path'), PATH_SEPARATOR, SRC_PATH
)));
// Include the AdWordsUser
require_once LIB_PATH . '/AdWordsUser.php';
然后找到关于访问者的类并实例化并调用过滤器方法。
你没有看到文档? http://google-api-adwords-php.googlecode.com/svn/trunk/docs/index.html – 2012-08-07 09:36:17