To use sockethub from within the browser, you'll be establishing a websocket client and sending and receiving simple JSON objects to the client.
First, include the sockethub-client.js script, and then the following sequence connects to Sockethub, sets your Twitter credentials, and fetches your tweets:
The 4 values you have to put in for the Twitter credentials can be obtained by registering a Twitter app and then also generating an access token.
Now watch the console. the 'SEND', 'CONFIRM' and 'RECEIVE' messages are generated by the Sockethub client, the 'message!' log messages by the above code.