Twitter 4j with Netbeans

后端 未结 2 1600
不知归路
不知归路 2021-01-27 15:19

First time poster, but I\'m really stuck. I\'m working on a little project and I\'m trying to send out a tweet using a netbeans project. I\'m using twitter4j and it seems like

2条回答
  •  独厮守ぢ
    2021-01-27 15:46

    Your code looks ok. Have you confirmed your definitely using the correct consumer key and secret for your app? Try twitter.verifyCredentials() to see if you get the same error, or a more specific error.

    If you're correcting to the net via a proxy, you will need to include your proxy settings to allow the connection to succeed, details can be found here http://twitter4j.org/en/configuration.html#HTTP%20proxy%20server

    As an aside, you may want to remove you access token and secret from your post, if they're still valid then someone could login to your account with them.

提交回复
热议问题