Closed ghost closed 10 years ago
It is need to edit the update url like this.. before:
req, err = http.NewRequest("POST", "/1.1/statuses/update.json", body)
after:
req, err = http.NewRequest("POST", "https://api.twitter.com/1.1/statuses/update.json", body)
Now it works..
Source file and line : https://github.com/kurrik/twittergo-examples/blob/master/tweet/main.go#L60
Hey, thanks for using the library! I should update the default paths to use 1.1, so I'll reopen the issue until that's merged in.
Ok,
I'm new on Golang, I firstly able to use your library.
I think to create an app on terminal that controlls twitter account to improve my golang skills. Therefore I was playing to your twitter library.
In this case it is nice to hear that the library still is updating..
Hm, I was able to run the example successfully without modifying it. Can you try again with the original path:
req, err = http.NewRequest("POST", "/1.1/statuses/update.json", body)
? If you had just set up an app for write permission it may just have taken some time to propagate.
Hi @kurrik
Now It looks it works..
muratsplat@ThinkPad:~/goLang$ go run testExampleTwitter.go
Error #1 - Code: 34 Msg: Sorry, that page does not exist
exit status 1
muratsplat@ThinkPad:~/goLang$ go get github.com/kurrik/twittergo
muratsplat@ThinkPad:~/goLang$ go run testExampleTwitter.go
ID: 523005308642545664
Tweet: Hello 2014-10-17 09:59:14.007287793 +0300 EEST!
User: Murat Ödünç
Could not parse rate limit from response.
muratsplat@ThinkPad:~/goLang$
I have checked My twitter page. The app was able to send a twitt well.
If you have any change on the library I think that when I was playing the library, I had did something wrong ..
Thanks for letting me know! Sounds like it may just have been a temporary error.
Hi
The base url should be "api.twitter.com/1.1" ?
I was tring your example code, but it returns "Error #1 - Code: 215 Msg: Bad Authentication data exit status 1"
I have been tried this example that made by you https://github.com/kurrik/twittergo-examples/blob/master/tweet/main.go