Source for file status.php

Documentation is available at status.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Facebook
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10.  
  11. defined('JPATH_PLATFORM'or die();
  12.  
  13.  
  14. /**
  15.  * Facebook API Status class for the Joomla Platform.
  16.  *
  17.  * @package     Joomla.Platform
  18.  * @subpackage  Facebook
  19.  *
  20.  * @see         http://developers.facebook.com/docs/reference/api/status/
  21.  * @since       13.1
  22.  */
  23. {
  24.     /**
  25.      * Method to get a status message. Requires authentication.
  26.      *
  27.      * @param   string  $status  The status message id.
  28.      *
  29.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  30.      *
  31.      * @since   13.1
  32.      */
  33.     public function getStatus($status)
  34.     {
  35.         return $this->get($status);
  36.     }
  37.  
  38.     /**
  39.      * Method to get a status message's comments. Requires authentication.
  40.      *
  41.      * @param   string   $status  The status message id.
  42.      * @param   integer  $limit   The number of objects per page.
  43.      * @param   integer  $offset  The object's number on the page.
  44.      * @param   string   $until   A unix timestamp or any date accepted by strtotime.
  45.      * @param   string   $since   A unix timestamp or any date accepted by strtotime.
  46.      *
  47.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  48.      *
  49.      * @since   13.1
  50.      */
  51.     public function getComments($status$limit 0$offset 0$until null$since null)
  52.     {
  53.         return $this->getConnection($status'comments'''$limit$offset$until$since);
  54.     }
  55.  
  56.     /**
  57.      * Method to post a comment to the status message. Requires authentication and publish_stream and user_status or friends_status permission.
  58.      *
  59.      * @param   string  $status   The status message id.
  60.      * @param   string  $message  The comment's text.
  61.      *
  62.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  63.      *
  64.      * @since   13.1
  65.      */
  66.     public function createComment($status$message)
  67.     {
  68.         // Set POST request parameters.
  69.         $data['message'$message;
  70.  
  71.         return $this->createConnection($status'comments'$data);
  72.     }
  73.  
  74.     /**
  75.      * Method to delete a comment. Requires authentication and publish_stream and user_status or friends_status permission.
  76.      *
  77.      * @param   string  $comment  The comment's id.
  78.      *
  79.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  80.      *
  81.      * @since   13.1
  82.      */
  83.     public function deleteComment($comment)
  84.     {
  85.         return $this->deleteConnection($comment);
  86.     }
  87.  
  88.     /**
  89.      * Method to get a status message's likes. Requires authentication.
  90.      *
  91.      * @param   string   $status  The status message id.
  92.      * @param   integer  $limit   The number of objects per page.
  93.      * @param   integer  $offset  The object's number on the page.
  94.      * @param   string   $until   A unix timestamp or any date accepted by strtotime.
  95.      * @param   string   $since   A unix timestamp or any date accepted by strtotime.
  96.      *
  97.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  98.      *
  99.      * @since   13.1
  100.      */
  101.     public function getLikes($status$limit 0$offset 0$until null$since null)
  102.     {
  103.         return $this->getConnection($status'likes'''$limit$offset$until$since);
  104.     }
  105.  
  106.     /**
  107.      * Method to like status message. Requires authentication and publish_stream and user_status or friends_status permission.
  108.      *
  109.      * @param   string  $status  The status message id.
  110.      *
  111.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  112.      *
  113.      * @since   13.1
  114.      */
  115.     public function createLike($status)
  116.     {
  117.         return $this->createConnection($status'likes');
  118.     }
  119.  
  120.     /**
  121.      * Method to unlike a status message. Requires authentication and publish_stream and user_status or friends_status permission.
  122.      *
  123.      * @param   string  $status  The status message id.
  124.      *
  125.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  126.      *
  127.      * @since   13.1
  128.      */
  129.     public function deleteLike($status)
  130.     {
  131.         return $this->deleteConnection($status'likes');
  132.     }
  133.  
  134. }

Documentation generated on Tue, 19 Nov 2013 15:14:19 +0100 by phpDocumentor 1.4.3