I\'m building facebook App, but as I understood I need SSL.
Is there any way to avoid buying SSL?
Yes you can use shared SSL instead of dedicated SSL for your fb app, check you hosting provider manual how to use shared SSL. Hostgator and bluehost provide shared ssl and the usage guide is given on the respective websites.
You can avoid using an SSL certificate under these conditions:
https://example.com
You can avoid buying such certificate if your hosting provider has one for you (for example: heroku - ssl setup).
You can try to search for free certificates. As far as I know, http://startssl.com provides such a service.
You can use self-signed certificates. Your users will be prompted to accept validity of the certificate (or forced to add exception, which is a cumbersome process).