It used to be found in the System Settings in 11.10 but I guess it's been replaced by Privacy in 12.04. I tried to set it up by using the Contacts app but I accidentally closed the option to add my online accounts and now it's gone. I've tried uninstalling Contacts and then doing a clean up with Ubuntu Tweak but that doesn't seem to have done anything. How can I set up my online acounts?
I think you are looking for Broadcast accounts.
Type the following command:
sudo gedit /usr/share/applications/gnome-online-accounts-panel.desktop
Scroll down till you see the following:
Change it to look like the following:
Click save. Then try searching accounts in the dash.
The Online Accounts panel doesn't appear if you are using Unity. In theory, you don't need it with stock Ubuntu 12.04. However, it is useful if you have installed Evolution Mail, Contacts or Documents.
In some of these applications, like Contacts, you can open the Online Accounts panel directly from their own menus. Otherwise, you can get to it in the following ways:
If you have System Settings open, close it. Open a terminal, and run the following command:
env XDG_CURRENT_DESKTOP=GNOME gnome-control-center online-accounts
Alternatively, install GNOME Shell in Software Centre, log out, and log in again but choose the GNOME session before typing your password. (To choose a session from the login screen, click the cog icon to the top right of the password field). When you open System Settings from the user menu, you will see Online Accounts as one of the options.