Chunk count = 0 //x Chunk total = 0 //y Capture text content of comment form Trigger POST method of comment form Capture page url after update Create short url of page url via bit.ly Save length of bit.ly url in numeric variable authenticate user in twitter While not end of comment text chunk count = chunk count + 1 parse comment text until chunk is built: chunk max length = 140 - ((bit.ly url + 1) + len("x/y") + 1) // x = chunk number // y = chunk total // chunk needs to take spaces into account-- // break chunks on spaces, never any other character // this means chunks will often be less than 140 characters chunk = x/y + " " + tempchunk + " " +bit.ly.url end parse chunk total = chunk total + 1 delete chunk text from overall comment submit chunk as tweet end while cleanup/close