Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 650 Bytes

readme.markdown

File metadata and controls

18 lines (11 loc) · 650 Bytes

Justin.tv PHP Client Library

Requires the OAuth PECL extension. Install it with pecl install oauth. See http://pecl.php.net/package/oauth for more info.

How to use:

How to be authenticated as a user:

  1. Put your oauth keys in jtv_constants.inc.php
  2. Call start_user_authentication, which will recirect the user to Justin.tv to log in. $redirect should be a page on your site that implements step 3.
  3. Create a page that calls recieve_user_authentication, which will return true on success.
  4. Do authenticated requests with the get and post functions.

See the test directory for an example usage.