vartanbeno / go-reddit

Go library for accessing the Reddit API.
Other
310 stars 84 forks source link

upvoting a post shows error 400 #25

Open sabyasachi07 opened 3 years ago

sabyasachi07 commented 3 years ago

func run() (err error) { credentials := reddit.Credentials{ID: "", Secret: "", Username: "", Password: ""} client, err := reddit.NewClient(credentials)

if err != nil {
    return
}
vote, err := client.Post.Upvote(context.Background(), "t3_ig9u4z")
if err != nil {
       return err
    }
  fmt.println(vote)

return }