It is not guaranteed that generating hashkey with this single openssl method will work. If it does not work for me. But thanks for giving me a direction to solve my issue.
Guaranteed Solution : You need to break the whole command in separate commands and have to write output of every execution in file.
You can take the help from the following link :
http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-1
Enjoy :)