Facebook integration in web deploy

I have tried to integrate Facebook using Facebook SDK using [these step][1]
But it is showing this error while running
“FB.getLoginStatus() called before calling FB.init()”
“FB.login() called before FB.init()”

How to clear this?
Need Help Please!!
[1]: http://www.cocos2d-x.org/docs/manual/framework/html5/facebook-sdk/facebook-sdk-on-web/en