I know it's a little bit later, but anyway ;-)
Viber uses its own copy of LibQt5 located in /opt/viber/lib and /opt/viber/plugins/. In order to make Fcitx[5] working with this copy of Qt, you need to put the relevant Fcitx input plugin for Qt. In case of Fcitx5 it's merely a symlink from /usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so to /opt/viber/plugins/platforminputcontexts/ like this:
ln -sf ../../../../usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so \
/opt/viber/plugins/platforminputcontexts/
I have discovered this recipe in https://github.com/vinhjaxt/fcitx5-unikey