If you need to access data outside the blockchain, you can use an oracle. Here is a tutorial walk-through of how to do it: https://www.toptal.com/ethereum/ethereum-oracle-contracts-tutorial-pt1
The other possibility is to store the candidate information on the blockchain and updating the blockchain from your app.
You can't directly access any resources outside the blockchain. All the data your contract wants to use has to be input into the blockchain.
So you just have to have some functionality in your backend to send a transaction to the contract with all the candidate names.