listSubscribe - doesn't seem to do anything.

Jun 21, 2011 at 3:19 AM

Hi,

I have a small widget for subscribing to a newsletter. It is a textbox and a button. On button click , this is the code.

        Dim input As listSubscribeInput = New listSubscribeInput()
        ' any directive overrides

        input.api_Validate = True
        input.api_AccessType = EnumValues.AccessType.Serial
        input.api_OutputType = EnumValues.OutputType.JSON
        ' method parameters
        input.parms.apikey = "######################-us2"
        input.parms.id = "#######"
        input.parms.double_optin = True
        input.parms.replace_interests = True
        input.parms.send_welcome = True
        input.parms.merge_vars = New Dictionary(Of String, Object)
        input.parms.update_existing = True
        input.parms.email_address = txtEmail.Text
        input.parms.email_type = EnumValues.emailType.NotSpecified

        Dim listCmd As New listSubscribe(input)

        Dim output As listSubscribeOutput = listCmd.Execute()

'Handle output here...

 

I can't seem to get anything to happen. I do a code break and there are no error in the error object, but nothing happens.

The api key is good because we are using it on a wordpress site and it works fine.

What am I doing wrong.

Jun 21, 2011 at 6:00 AM
Pittser, download my example code and see how it's correctly done.


source code:



Now with listSubscribe and listUnsubscribe.



Bruno Alexandre
[web] www.balexandre.com
[twitter] http://twitter.com/balexandre




On Tue, Jun 21, 2011 at 5:19 AM, pittster <notifications@codeplex.com> wrote:

From: pittster

Hi,

I have a small widget for subscribing to a newsletter. It is a textbox and a button. On button click , this is the code.

        Dim input As listSubscribeInput = New listSubscribeInput()
' any directive overrides

input.api_Validate = True
input.api_AccessType = EnumValues.AccessType.Serial
input.api_OutputType = EnumValues.OutputType.JSON
' method parameters
input.parms.apikey = "######################-us2"
input.parms.id = "#######"
input.parms.double_optin = True
input.parms.replace_interests = True
input.parms.send_welcome = True
input.parms.merge_vars = New Dictionary(Of String, Object)
input.parms.update_existing = True
input.parms.email_address = txtEmail.Text
input.parms.email_type = EnumValues.emailType.NotSpecified

Dim listCmd As New listSubscribe(input)

Dim output As listSubscribeOutput = listCmd.Execute()

'Handle output here...

I can't seem to get anything to happen. I do a code break and there are no error in the error object, but nothing happens.

The api key is good because we are using it on a wordpress site and it works fine.

What am I doing wrong.

Read the full discussion online.

To add a post to this discussion, reply to this email (PerceptiveMCAPI@discussions.codeplex.com)

To start a new discussion for this project, email PerceptiveMCAPI@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


May 19, 2012 at 7:02 PM

For anyone still struggling, with subscribing a user using the PerceptiveMCAPI, i've written a step-by-step walk through on my blog, with C# and VB code.

http://mattjroden.com/post/2012/05/19/Mailchimp-Subscribe-form-in-ASPnet-VB-C.aspx

Hope it helps!

 

p.s. Don't forget to like/comment/share if you find it helpful!