You are here

function Disqus::create_post in Disqus 7

Creates a new post.

Creates a comment to the thread specified by id.

Parameters

$thread_id: the thread to post to

$message: the content of the post

$author_name: the post creator’s name

$author_email: the post creator’s email address

$options:

  • partner_api_key
  • created_at: Format: 2009-03-30T15:41, Timezone: UTC
  • ip_address: the author’s IP address
  • author_url: the author's homepage
  • parent_post: the id of the parent post
  • state: Comment's state, must be one of the following: approved, unapproved, spam, killed

File

./disqus.php, line 263
Provides the Disqus PHP API.

Class

Disqus
The Disqus PHP API.

Code

function create_post($thread_id, $message, $author_name, $author_email, array $options = array()) {
  $options['thread_id'] = $thread_id;
  $options['message'] = $message;
  $options['author_name'] = $author_name;
  $options['author_email'] = $author_email;
  return $this
    ->call('create_post', $options, TRUE);
}