Redundant Twitter Message


#1

Hi Team,
In my product i have implemented twitter. I am using open source twitter API. But some time, the problem is when i send single twitter message form my product am getting duplicate twitter message in my account, that means i can see same twitter message 4 or 5 times. I want to know where is the problem either in my development part or twitter side. I can see only one log is printed but receiving side multiple times.

Looking forward for your valuable reply.

Thanks in advance…


#2

There are times when our duplicate prevention does not detect the same tweet being sent to the same account – however, for that to happen your app would still likely have had to try sending the tweet multiple times. How do you respond to errors you receive from statuses/update, if and when you encounter them?


#3

Thanks for your reply. I am sure, my application only one time sending the tweet. This scenario not happen at all time. Only few times only i can see the duplicate tweets. But, in my application log i can see only one log(printed tweet message only once).

My code is

                    ResponseList<?> list = twitter.lookupUsers(screenNames);
		Iterator<?> it = list.iterator();
		while (it.hasNext()) {
			User user = (User) it.next();
			iSendUserId = user.getId();
		}
		if (iSendUserId != 0) {
			twitter.sendDirectMessage(iSendUserId, builder.toString());
			logger.info("Twitt sent to ---" + userId);
		} else {
			logger.info("Twitt is not send to ---" + userId);
		}

#4

No thang