How to Integrate Aweber in WordPress

You are here : Home / How to Integrate Aweber in WordPress

Aweber integration with wordpress, a perfect combination to promote email marketing using your wordpress site. This post shows how to integrate the aweber plugin on your wordpress website and useful guide to get authentication variables of Aweber API.To get started, You need the following information to communicate with aweber account using php.
  • consumerKey
  • consumerSecret
  • accessKey
  • accessSecret

ConsumerKey and ConsumerSecret in aweber api, are properties of application while accessKey and accessSecret are authorization properties. You must need to authorize your application with aweber account to get accessKey and accessSecret.

Create A New App on Aweber

To create an aweber application, you should have a developer account on aweber lab which is totally different from a normal aweber account. After logging in from your developer account, go to the apps page.

create a new app on aweber How to Integrate Aweber in Wordpress

Get ConsumerKey and ConsumerSecret from Aweber Application

Aweber apps page display list of applications created by user and display consumerKey and consumerSecret as well.

get consumer key and consumer secret aweber integration How to Integrate Aweber in Wordpress

Get accessKey and accessSecret from Aweber Authentication

Get accessKey and accessSecret using aweber authorization was always a confusing chapter for me because of lack of well written Aweber documentation. Once authorization completed, an authorization code displayed on your screen which has 5 elements separated by pipe (|).

get authorization code in aweber integration How to Integrate Aweber in Wordpress

To authorize your application to connect your Aweber account use following code snippets.

how to authorize your aweber app usingphp How to Integrate Aweber in Wordpress

Once you have consumerKey, consumerSecret,AccessKey and accessSecret, you’re ready to go integration process. Follow these steps to integrate Aweber as a wordpress plugin using php.

STEP 1 – First of all, create an option under Settings.The option page must contain a form having input for following five keys

  • consumerKey
  • consumerSecret
  • accessKey
  • accessSecret
  • list_id

// list id where your emails will be subscribed.

STEP 2 – Next we need to call an action hook when a user is registered.

This action hook allows you to access data for a new user immediately after they are added to the database. The user id is passed to hook as an argument.

The function ‘aweber_registration’ is run during WordPress ‘user_register’ action.

STEP 3- Here the definition of ‘aweber_registration’ function.

Download aweber_api zip file from https://github.com/aweber/AWeber-API-PHP-Library

2. Retrieve user details like email, first name and last name from database.

3. Get option values of option page from databse .

4. Create an object using Aweber API PHP library.

5. Add following code under try statement.

6. Add following code under catch statement so that whenver an exception falls, the following error message is displayed.

This guide is to integrate aweber api when a new user registered on your site as a wordpress plugin. You may follow same coding patterns to write up stand alone php scripts for aweber integration using php.

 How to Integrate Aweber in Wordpress

Flipper Code

We have been building WordPress Plugins at flipper code since 2008. We follow wordpress coding standard that ensures we deliver the excellent wordpress plugins and services.

More Posts - Website

Follow Me:
twitter How to Integrate Aweber in Wordpressfacebook How to Integrate Aweber in Wordpressgoogleplus How to Integrate Aweber in Wordpress

Customize Product according to your requirements?

We will be glad to discuss any of your needs related to our wordpress plugins . if any of functionality you'd like to see in products, you can reach us by via email hello@flippercode.com.