maciekmm / messenger-platform-go-sdk

:envelope: A GO SDK for Facebook's messenger-platform: https://developers.facebook.com/docs/messenger-platform
MIT License
110 stars 27 forks source link

SetWelcomeMessage returns a 400 #7

Closed EwanValentine closed 8 years ago

EwanValentine commented 8 years ago

Hi there! Me again :)

When I attempt to set a welcome message, like...

err := mess.SetWelcomeMessage(&messenger.Message{
    Text: "Hello!",
})

if err != nil {
    log.Fatal(err)
}

I get an error Invalid status code.

So I had a little dig into the code and I've noticed in welcomemessage.go

var welcomeMessage = ctaBase{
    SettingType: "setting_type",
    ThreadState: "new_thread",
}

According to the docs, that should be...

var welcomeMessage = ctaBase{
    SettingType: "call_to_actions",
    ThreadState: "new_thread",
}

However I tried changing this and got the same result.

EwanValentine commented 8 years ago

Submitted a PR for the issue I found, it doesn't solve the 400 still unfortunately :(

maciekmm commented 8 years ago

@EwanValentine I will investigate further, thanks for reporting and for PR.