I’ve not installed but this might be of help
http://forums.xfinity.com/t5/TV-App/Xfinity-TV-on-Roku/td-p/2834869
I did a search on the site and went to the FAQs “How to Activate” link. After adding the code, they want you to sign into an account. So, do you need to have an account for Xfinity, and pay for your internet service through them in order to use this? I already have Time Warner/Spectrum, so am not interested in paying for this service.