The response indicates that the SSL certificate foursquare have is for another domain (their CDN), you either need to connect directly to the API using the CDN domain, or ignore the fact the certificates are for the wrong host.
The section on handling SSL certificates explains how to ignore incorrect hosts: http://book.cakephp.org/2.0/en/core-utility-libraries/httpsocket.html#handling-ssl-certificates (ssl_verify_host)