Question: I am doing an application that requires the Facebook and Foursquare Login.For that I am using android SDk for Facebook
IS there any SDK for foursquare in android like we have facebook SDK for android.

Answer: 
As stated in a comment, the problem was permission based. The minimum permissions required for this to work are as follows

"711 on the executable files, 644 on input file, 666 on output file and 755 on containing folder."

Thanks for all the contributions.
Another possible problem is that if you have SELinux enabled (as is the default in Fedora and Red Hat), it will block Apache from running commands which have not been marked as being in the context of Apache. This is a security feature meant to make it so that if someone hacks your web server or web application they can't use it to run arbitrary commands on your server.

To set the correct context for the application, you'd want to run the command `chcon -t httpd_sys_script_exec_t execname` (where execname is replaced with the name of your executable). You'll also need to change the context of the input and output files to allow them to be written by apache scripts via chcon. You'll want to use type `httpd_sys_script_ro_t` for read-only input files and type `httpd_sys_script_rw_t` for read/write output files or type `httpd_sys_script_ra_t` for read/append output files. The chcon command generally only changes things until the next server reboot, though. File contexts are remapped based on directories at that time, so in the long run, you'll want to adjust your policy to set those contexts as the default contexts for those files. I don't remember how to do that off the top of my head, however, so you'll need to look that up.