Automatic Window Switcher
If the applications are in different windows, I think you can simply activate them. Save this as a stay open application:

property counter : 0

on idle
    set counter to counter + 1
    if counter mod 2 = 0 then
        activate application "Twitter"
    else
        activate application "Firefox"
    end if

    return 3 -- in seconds
end idle