
Joern Huxhorn wrote:
Hi guys,
I'm using Twitter4J on another small project and I was wondering if a TwitterAppender would make sense.
I think it would be cool, similar to an IRC appender.
I'd obviously only do something in case of an error to prevent too much tweets followed by a ban of the user. I would have the benefit (at least foe ppl like me that get tweets pushed to their phone ;)) that I would get informed immediately if something really bad happens.
I'm just brainstorming here but I'd like to hear other ppls opinions on the case. The Appender would have a dedicated Twitter user. Twitter user and password would be set in the config. Additionally, a list of Twitter usernames would be provided. Those would receive a reply (or a DM?) in case of an error.
Some questions that jump to my mind: What should the actual message contain? We only have 140-username.length()-2 characters.
I think the layout should take care of this.
Messages shouldn't contain anything confidential...
I think you should use makers for this.
Messages must not be the same all the time. They need to differ, otherwise they will be ignored by Twitter. How should flooding be prevented if the app keeps producing errors (this would ban the twitter user, otherwise)
I think that should go into an other appender (TrottlingAppender or whatever) that delegates to the TwitterAppender. Cheers Philippe