package main
import (
+ "fmt"
+
"git.vexingworkshop.com/signal9/dead-tooter/pkg/mastodon"
)
panic(err.Error())
}
- account.VerifyCredentials(token)
+ err = account.VerifyCredentials(token)
+ if err != nil {
+ panic(err.Error())
+ }
+
+ fmt.Printf("%+v\n", token)
}
func (a *Account) RequestToken(app Application, code string) (token Token, err error) {
v := url.Values{}
v.Set("client_id", app.ClientID)
+ v.Set("client_secret", app.ClientSecret)
v.Set("code", code)
v.Set("redirect_uri", app.RedirectURI)
v.Set("grant_type", "authorization_code")