List Building

Facebook Connect – Aweber Email Opt In

Opt-in forms are a great way of capturing emails. The email addresses you capture are all potential customers. This is the basics of list building. If you don’t know about this, I suggest you head over and get my guide at

What else do you notice on that page?

Right! The form to enter your email address has been replaced with a Facebook connect button. When you click the connect button a box comes up asking the user to confirm they are happy to disclose their name and email address. These details then get sent to Aweber.

Now there are a couple of reasons why this is a better than the traditional way. The main one being, you get the email address which is associated with their Facebook account. This means, you get a real, up to date email address, for everyone who signs up.

If you use a form for visitors to fill out people put in fake email addresses, or use accounts which they never log into, they just use them to sign up for freebies. This means your emails are never read!

Another problem which is fixed here is the need for people to double opt in.

We already know their email address is real, so there is no need for you to force your subscribers to confirm their subscription. When you do, a good portion of your leads simply don’t confirm. This lead is then lost forever.

So, you want to know how to put one on your freebie page?

Well, there are three ways you can do this. If you know how, you can implement it yourself. This is pretty difficult though, and should only really be tried by web experts. You could hire someone, this is a good option. I recommend using odesk to find someone who can do this for you. There is a lot of talented coders out there who will charge very little to do this for you. I paid $60 to have someone set mine up for me.

Or you could use these files which I have ready for you to download. I should say now. If you use my file the URL of the page your visitors will be redirected to, after pressing the connect button, is in the source code. This basically means people will be able to get to your thank you page without opting in, so you might have a problem if your download link is there. To get around this, you can send them the download link in a follow up email, instead of having it on the page they land on, after they sign up.

To be honest though, I’m not actually concerned by this fact. I direct them straight to the download page. It’s only a free offer anyway, people aren’t getting away with not paying for something. The majority of people will hit the button anyway and I am happy settling for the majority. Besides, I have affiliate links in my report so the more people who get my report the better.

How To Implement

First you need to download this file index.html (right click and go to save as).

This is just a page with a Facebook login button. Your website will be built around this. The idea is to build a site which will entice them to click that button, they then get directed to a thank you page. So, create another blank html document, it doesn’t matter what this is called, but make sure you remember what you name it. This will become the page your visitors get directed to after  they hit the connect button.

We’ll leave these for now. Head over to Click the Apps tab at the top then click on Create a new app, type in an app name and select a category.

On the next page click + Add Platform and select website.

Now you need to hit the Settings tab on the side and you will come to a screen like this.

appdetails Facebook Connect   Aweber Email Opt In

Fill out the fields as seen in the screenshot but make sure you replace ‘’ with your address then hit save changes.

Also,  take note of the application ID, we will need this later.

Head over to Aweber. In Aweber make a new list and remember the name of it, we will need this also.

Upload your thank you page to your web host and take note of the URL it resides at. So, now you should have a list of the following;

Facebook application ID
Aweber list name
Thank you page URL

Now open index.html in a text or html editor. Find the pieces of code shown below and replace the necessary parts of code, where indicated.

<script type="text/javascript"> 
window.fbAsyncInit = function() {

REPLACE WITH YOUR APP ID = put your Facebook application ID here,

<input type="hidden" name="listname" value="REPLACE WITH YOUR LIST NAME" /> 
<input type="hidden" name="redirect" value="REPLACE WITH YOUR REDIRECT URL" />

REPLACE WITH YOUR LIST NAME = put your Aweber list name here
REPLACE WITH YOUR REDIRECT URL = put your thank you page URL here.

The code below is the code for the Facebook login button. You can move this to wherever, on your page you want it to appear.

<fb:login-button autologoutlink="true"
INSERT BUTTON TEXT HERE</fb:login-button>

Replace the INSERT BUTTON TEXT HERE, with whatever you want your button to say. You can leave this blank for the default Facebook login.

UPDATE:This code above is very basic, if you use Mail Chimp for example this code won’t work. If you want something more customisable check out FB Lead Gen, it’s pretty awesome. I’ve written a blog post on their product which can be found here Improve Your Squeeze Page Conversions With a Facebook Opt in Button. Hope you like it!

There you have it, hope you found this post useful. If you did (or didn’t) let me know in the comments and make sure you share it with your friends.

 Facebook Connect   Aweber Email Opt In admin (32 Posts)

Tagged , , , , ,

Share this post

Related Posts


  1. Patrick FriedlMarch 25, 2011 at 2:58 am

    Excellent article and code. Now since you’re capturing a live email, do you set your Aweber list to single opt-in?

  2. TomMarch 28, 2011 at 11:58 am

    Single opt-in is what you need to have your list set to.

  3. TomMarch 31, 2011 at 6:50 pm

    Single opt-in is what you need to have your list set to.

  4. CliveApril 10, 2011 at 4:59 pm

    Looks like this will not work anymore since the FBML has been discontinued on FB, am I correct? Is there a newer version of the script that will work in frames?

  5. TomApril 10, 2011 at 7:06 pm

    It still works, I have a working version of it here .

  6. BillMay 26, 2011 at 9:48 am

    awesome code but when requesting permission to access it says access basic info , email, post on wall for that last feature I have a plugin that allows to set the message to be posted on the persons wall once the click allow do you no how i could add the message in this code

  7. TomMay 26, 2011 at 12:56 pm

    I’m afraid not. I paid someone to make this code for me.

    I’m not sure I would want to post messages on people’s walls though. I know there’s a lot of facebook apps that do use this, but I think it looks kind of spammy.

    I think as facebook users get more savvy that sending out messages like that will become more damaging than useful.

  8. BillMay 27, 2011 at 10:05 pm

    Would it be possible to get the programmers email who made the code for you as I want one similar but for using facebook access not facebook login which auto signs the user off if they are all ready signed on facebook. I want to use something like this     client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream

  9. TomMay 28, 2011 at 12:47 pm

    I’ll tell him about this post so he can come and tell you the best way to contact him.

  10. SamMay 30, 2011 at 2:34 pm

    Hey Bill,

    This is Sam and i create the code for Tom

  11. BillJune 2, 2011 at 9:39 am

    Hello Sam I was wondering if you can write a code for me i want to use facebook  dialog oauth to collect the user email and forward them to the download page the oauth part of code is below but need the code for awaber and mailchimp

    Example of what i want can be found at this is a plugin i bought you will see the facebook access button on the top left image.

    when user click facebook access pops up asking for permission when use allows it collect email and forward the user to the page of my desire

  12. BillJune 2, 2011 at 9:40 am

    Sam you can reach me at williamlark on skype or

  13. SimJuly 4, 2011 at 7:19 pm

    Hi Sam, can you add me on skype simeon.tuitt been looking for someone with experience in this area.

  14. EvanDecember 7, 2011 at 9:09 pm

    Hi is there a trick to getting the facebook pop up request permission box to look like yours on  On my blog, even if I am logged into facebook when hitting the connect button it makes me log in again.  Then it is giving me a different looking request permission screen then yours on  

    In the end my button adds the person to my list, but your request permission screen look way better.  Your help is much appreciated.

  15. AngieSeptember 18, 2012 at 12:52 pm

    Your reasons for collecting an email address via Facebook make sense, except, the last I checked (and it was a few months ago) about 50% of the population is not on Facebook. I am concerned that I will go to this extra effort and still only reach about half of my potential leads. Are people who aren’t on Facebook not likely to join emailing lists too, meaning people not on Facebook wouldn’t make good leads anyway? I found this article because I was trying to figure out how to get my Facebook follows to subscribe to my Aweber email list. I thought I might be able to add some kind of customized app to my Facebook page, with an offering. Is that possible?

  16. TomSeptember 25, 2012 at 5:01 pm

    You’re right that many internet users are not on Facebook, and because of this you will definitely isolate people joining your list who would have with a regular opt in box.

    These could have been perfectly good leads.

    However, this method also filters out fake email addresses and email addresses set up to catch unwanted email addresses.

    This means that you will be able to get your emails in front of more people than a regular list.

    This obviously won’t be right for everyone in every niche and should be tested accordingly but (for me) it is worth losing some good leads to ensure I get rid of all the bad ones.

  17. Marketing Day: February 19, 2013February 19, 2013 at 5:03 pm

    [...] Facebook Connect – Aweber Email Opt In, [...]

Leave a reply

Your email address will not be published. Required fields are marked *