Using readymade class

Though its belongs to v1 and having php things.
Some people say that we should not expose secrete key and consumer
key so how can this be achieved using only JS.
so right now I am pushing these things using php.