I'd recommend going through standard troubleshooting processes for this issue in the first instance. Yahoo and Twitter connected accounts are working fine, generally, so it may be something specific to your server or how the apps are set up.
Note that with Twitter, they have recently started becoming more strict in terms of callback URLs. You'll need to ensure your callback URL in the app settings is <your_site_url>/connected_account.php or it will not work.