Yes, your spot on, one part initializes the SDK, the other is for the button.
I'm informed I got it working by someone who uses fb, but for some reason it only works on ie/ff/chrome, not safari. Not a major issue for me really, but still, I wish there were more compatibility between browsers.