SHARE
TWEET

HF API v2 Writable Field List

xerotic Jun 1st, 2020 1,703 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. require_once "hf_api.php";
  4.  
  5. // Initialize api instance
  6. $api = new HF_API();
  7.  
  8. // Set the access token for the specific authorized member
  9. $api->setAccessToken("ACCESS_TOKEN_HERE");
  10.  
  11. // Let's make a post
  12. $write = $api->write([
  13.     "posts" => [ // Posts Write Permissions
  14.         '_tid' => "THREAD_ID",
  15.         '_message' => "POST_MESSAGE",
  16.     ]
  17. ]);
  18.  
  19. // Let's make a thread
  20. $write = $api->write([
  21.     "threads" => [ // Posts Write Permissions
  22.         '_fid' => "FORUM_ID",
  23.         '_subject' => "THREAD_SUBJECT",
  24.         '_message' => "FIRST_POST_MESSAGE",
  25.     ]
  26. ]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top