Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/facebook.zip

PK'�[&
:iQQ	album.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Album class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/album/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookAlbum extends JFacebookObject
{
	/**
	 * Method to get an album. Requires authentication and user_photos or
friends_photos permission for private photos.
	 *
	 * @param   string  $album  The album id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getAlbum($album)
	{
		return $this->get($album);
	}

	/**
	 * Method to get the photos contained in this album. Requires
authentication and user_photos or friends_photos permission for private
photos.
	 *
	 * @param   string   $album   The album id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhotos($album, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($album, 'photos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to add photos to an album. Note: check can_upload flag first.
Requires authentication and publish_stream  permission.
	 *
	 * @param   string  $album    The album id.
	 * @param   string  $source   Path to photo.
	 * @param   string  $message  Photo description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPhoto($album, $source, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($album, 'photos', $data,
array('Content-Type' => 'multipart/form-data'));
	}

	/**
	 * Method to get an album's comments. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $album   The album id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($album, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($album, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on an album. Requires authentication and
publish_stream  permission.
	 *
	 * @param   string  $album    The album id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($album, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($album, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream 
permission.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get album's likes. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $album   The album id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($album, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($album, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like an album. Requires authentication and publish_stream 
permission.
	 *
	 * @param   string  $album  The album id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($album)
	{
		return $this->createConnection($album, 'likes');
	}

	/**
	 * Method to unlike an album. Requires authentication and publish_stream 
permission.
	 *
	 * @param   string  $album  The album id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($album)
	{
		return $this->deleteConnection($album, 'likes');
	}

	/**
	 * Method to get the album's cover photo, the first picture uploaded
to an album becomes the cover photo for the album.
	 * Requires authentication and user_photos or friends_photos permission
for private photos.
	 *
	 * @param   string   $album     The album id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 *
	 * @return  string  URL of the picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($album, $redirect = true)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		return $this->getConnection($album, 'picture',
$extra_fields);
	}
}
PK'�[�R�GGcheckin.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Checkin class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/checkin/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookCheckin extends JFacebookObject
{
	/**
	 * Method to get a checkin. Requires authentication and user_checkins or
friends_checkins permission.
	 *
	 * @param   string  $checkin  The checkin id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getCheckin($checkin)
	{
		return $this->get($checkin);
	}

	/**
	 * Method to get a checkin's comments. Requires authentication and
user_checkins or friends_checkins permission.
	 *
	 * @param   string   $checkin  The checkin id.
	 * @param   integer  $limit    The number of objects per page.
	 * @param   integer  $offset   The object's number on the page.
	 * @param   string   $until    A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since    A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($checkin, $limit=0, $offset=0, $until=null,
$since=null)
	{
		return $this->getConnection($checkin, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to post a comment to the checkin. Requires authentication and
publish_stream and user_checkins or friends_checkins permission.
	 *
	 * @param   string  $checkin  The checkin id.
	 * @param   string  $message  The checkin's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($checkin, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($checkin, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get a checkin's likes. Requires authentication and
user_checkins or friends_checkins permission.
	 *
	 * @param   string   $checkin  The checkin id.
	 * @param   integer  $limit    The number of objects per page.
	 * @param   integer  $offset   The object's number on the page.
	 * @param   string   $until    A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since    A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($checkin, $limit=0, $offset=0, $until=null,
$since=null)
	{
		return $this->getConnection($checkin, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a checkin. Requires authentication and publish_stream
and user_checkins or friends_checkins permission.
	 *
	 * @param   string  $checkin  The checkin id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLike($checkin)
	{
		return $this->createConnection($checkin, 'likes');
	}

	/**
	 * Method to unlike a checkin. Requires authentication and publish_stream
permission.
	 *
	 * @param   string  $checkin  The checkin id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($checkin)
	{
		return $this->deleteConnection($checkin, 'likes');
	}
}
PK'�[�comment.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Comment class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/Comment/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookComment extends JFacebookObject
{
	/**
	 * Method to get a comment. Requires authentication.
	 *
	 * @param   string  $comment  The comment id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComment($comment)
	{
		return $this->get($comment);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission.
	 *
	 * @param   string  $comment  The comment id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get a comment's comments. Requires authentication.
	 *
	 * @param   string   $comment  The comment id.
	 * @param   integer  $limit    The number of objects per page.
	 * @param   integer  $offset   The object's number on the page.
	 * @param   string   $until    A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since    A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($comment, $limit=0, $offset=0, $until=null,
$since=null)
	{
		return $this->getConnection($comment, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a comment. Requires authentication with
publish_stream permission.
	 *
	 * @param   string  $comment  The comment id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($comment, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($comment, 'comments', $data);
	}

	/**
	 * Method to get comment's likes. Requires authentication.
	 *
	 * @param   string   $comment  The comment id.
	 * @param   integer  $limit    The number of objects per page.
	 * @param   integer  $offset   The object's number on the page.
	 * @param   string   $until    A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since    A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($comment, $limit=0, $offset=0, $until=null,
$since=null)
	{
		return $this->getConnection($comment, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a comment. Requires authentication and publish_stram
permission.
	 *
	 * @param   string  $comment  The comment id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($comment)
	{
		return $this->createConnection($comment, 'likes');
	}

	/**
	 * Method to unlike a comment. Requires authentication and publish_stram
permission.
	 *
	 * @param   string  $comment  The comment id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($comment)
	{
		return $this->deleteConnection($comment, 'likes');
	}
}
PK'�[�>n~$A$A	event.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API User class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/event/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookEvent extends JFacebookObject
{
	/**
	 * Method to get information about an event visible to the current user.
Requires authentication.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getEvent($event)
	{
		return $this->get($event);
	}

	/**
	 * Method to get the event's wall. Requires authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a link on event's feed which the current_user is or
maybe attending. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($event, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on event's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($event, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;
		$data['link'] = $link;
		$data['name'] = $name;
		$data['caption'] = $caption;
		$data['description'] = $description;
		$data['actions'] = $actions;
		$data['picture'] = $picture;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
event's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($event, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}

	/**
	 * Method to get the list of invitees for the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getInvited($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'invited', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is invited to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isInvited($event, $user)
	{
		return $this->getConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to invite users to the event. Requires authentication and
create_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $users  Comma separated list of user ids.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createInvite($event, $users)
	{
		// Set POST request parameters.
		$data = array();
		$data['users'] = $users;

		return $this->createConnection($event, 'invited', $data);
	}

	/**
	 * Method to delete an invitation. Note: you can only delete the invite if
the current user is the event admin.
	 * Requires authentication and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $user   The user id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteInvite($event, $user)
	{
		return $this->deleteConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to get the list of attending users. Requires authentication and
user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getAttending($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'attending',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user is attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isAttending($event, $user)
	{
		return $this->getConnection($event, 'attending/' . $user);
	}

	/**
	 * Method to set the current user as attending. Requires authentication
and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createAttending($event)
	{
		return $this->createConnection($event, 'attending');
	}

	/**
	 * Method to get the list of maybe attending users. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMaybe($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'maybe', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is maybe attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isMaybe($event, $user)
	{
		return $this->getConnection($event, 'maybe/' . $user);
	}

	/**
	 * Method to set the current user as maybe attending. Requires
authentication and rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createMaybe($event)
	{
		return $this->createConnection($event, 'maybe');
	}

	/**
	 * Method to get the list of users which declined the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDeclined($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'declined',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user responded 'no' to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isDeclined($event, $user)
	{
		return $this->getConnection($event, 'declined/' . $user);
	}

	/**
	 * Method to set the current user as declined. Requires authentication and
rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createDeclined($event)
	{
		return $this->createConnection($event, 'declined');
	}

	/**
	 * Method to get the list of users which have not replied to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getNoreply($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'noreply', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user has not replied to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isNoreply($event, $user)
	{
		return $this->getConnection($event, 'noreply/' . $user);
	}

	/**
	 * Method to get the event's profile picture. Requires authentication
and user_events or friends_events permission.
	 *
	 * @param   string   $event     The event id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 * @param   string   $type      To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the event's profile picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($event, $redirect = true, $type = null)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		if ($type)
		{
			$extra_fields .= (strpos($extra_fields, '?') === false) ?
'?type=' . $type : '&type=' . $type;
		}

		return $this->getConnection($event, 'picture',
$extra_fields);
	}

	/**
	 * Method to get photos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhotos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'photos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a photo on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $source   Path to photo.
	 * @param   string  $message  Photo description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPhoto($event, $source, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($event, 'photos', $data,
array('Content-Type' => 'multipart/form-data'));
	}

	/**
	 * Method to get videos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getVideos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'videos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a video on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $source       Path to photo.
	 * @param   string  $title        Video title.
	 * @param   string  $description  Video description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createVideo($event, $source, $title = null, $description =
null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($title)
		{
			$data['title'] = $title;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		return $this->createConnection($event, 'videos', $data,
array('Content-Type' => 'multipart/form-data'));
	}
}
PK'�[�Z����facebook.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

use Joomla\Registry\Registry;

/**
 * Joomla Platform class for interacting with a Facebook API instance.
 *
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebook
{
	/**
	 * @var    Registry  Options for the Facebook object.
	 * @since  3.2.0
	 */
	protected $options;

	/**
	 * @var    JHttp  The HTTP client object to use in sending HTTP requests.
	 * @since  3.2.0
	 */
	protected $client;

	/**
	 * @var    JFacebookOAuth  The OAuth client.
	 * @since  3.2.0
	 */
	protected $oauth;

	/**
	 * @var    JFacebookUser  Facebook API object for user.
	 * @since  3.2.0
	 */
	protected $user;

	/**
	 * @var    JFacebookStatus  Facebook API object for status.
	 * @since  3.2.0
	 */
	protected $status;

	/**
	 * @var    JFacebookCheckin  Facebook API object for checkin.
	 * @since  3.2.0
	 */
	protected $checkin;

	/**
	 * @var    JFacebookEvent  Facebook API object for event.
	 * @since  3.2.0
	 */
	protected $event;

	/**
	 * @var    JFacebookGroup  Facebook API object for group.
	 * @since  3.2.0
	 */
	protected $group;

	/**
	 * @var    JFacebookLink  Facebook API object for link.
	 * @since  3.2.0
	 */
	protected $link;

	/**
	 * @var    JFacebookNote  Facebook API object for note.
	 * @since  3.2.0
	 */
	protected $note;

	/**
	 * @var    JFacebookPost  Facebook API object for post.
	 * @since  3.2.0
	 */
	protected $post;

	/**
	 * @var    JFacebookComment  Facebook API object for comment.
	 * @since  3.2.0
	 */
	protected $comment;

	/**
	 * @var    JFacebookPhoto  Facebook API object for photo.
	 * @since  3.2.0
	 */
	protected $photo;

	/**
	 * @var    JFacebookVideo  Facebook API object for video.
	 * @since  3.2.0
	 */
	protected $video;

	/**
	 * @var    JFacebookAlbum  Facebook API object for album.
	 * @since  3.2.0
	 */
	protected $album;

	/**
	 * Constructor.
	 *
	 * @param   JFacebookOAuth  $oauth    OAuth client.
	 * @param   Registry        $options  Facebook options object.
	 * @param   JHttp           $client   The HTTP client object.
	 *
	 * @since   3.2.0
	 */
	public function __construct(JFacebookOAuth $oauth = null, Registry
$options = null, JHttp $client = null)
	{
		$this->oauth = $oauth;
		$this->options = isset($options) ? $options : new Registry;
		$this->client  = isset($client) ? $client : new
JHttp($this->options);

		// Setup the default API url if not already set.
		$this->options->def('api.url',
'https://graph.facebook.com/');
	}

	/**
	 * Magic method to lazily create API objects
	 *
	 * @param   string  $name  Name of property to retrieve
	 *
	 * @return  JFacebookObject  Facebook API object (status, user, friends
etc).
	 *
	 * @since   3.2.0
	 * @throws  InvalidArgumentException
	 */
	public function __get($name)
	{
		$class = 'JFacebook' . ucfirst($name);

		if (class_exists($class))
		{
			if (false == isset($this->$name))
			{
				$this->$name = new $class($this->options, $this->client,
$this->oauth);
			}

			return $this->$name;
		}

		throw new InvalidArgumentException(sprintf('Argument %s produced an
invalid class name: %s', $name, $class));
	}

	/**
	 * Get an option from the JFacebook instance.
	 *
	 * @param   string  $key  The name of the option to get.
	 *
	 * @return  mixed  The option value.
	 *
	 * @since   3.2.0
	 */
	public function getOption($key)
	{
		return $this->options->get($key);
	}

	/**
	 * Set an option for the JFacebook instance.
	 *
	 * @param   string  $key    The name of the option to set.
	 * @param   mixed   $value  The option value to set.
	 *
	 * @return  JFacebook  This object for method chaining.
	 *
	 * @since   3.2.0
	 */
	public function setOption($key, $value)
	{
		$this->options->set($key, $value);

		return $this;
	}
}
PK'�[H�'yy	group.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Group class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/group/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookGroup extends JFacebookObject
{
	/**
	 * Method to read a group. Requires authentication and user_groups or
friends_groups permission for non-public groups.
	 *
	 * @param   string  $group  The group id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getGroup($group)
	{
		return $this->get($group);
	}

	/**
	 * Method to get the group's wall. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the group's members. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMembers($group, $limit = 0, $offset = 0)
	{
		return $this->getConnection($group, 'members', '',
$limit, $offset);
	}

	/**
	 * Method to get the group's docs. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDocs($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'docs', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the groups's picture. Requires authentication and
user_groups or friends_groups permission.
	 *
	 * @param   string  $group  The group id.
	 * @param   string  $type   To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the group's picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($group, $type = null)
	{
		if ($type)
		{
			$type = '?type=' . $type;
		}

		return $this->getConnection($group, 'picture', $type);
	}

	/**
	 * Method to post a link on group's wall. Requires authentication and
publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($group, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on group's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group        The group id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($group, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		if ($message)
		{
			$data['message'] = $message;
		}

		if ($link)
		{
			$data['link'] = $link;
		}

		if ($name)
		{
			$data['name'] = $name;
		}

		if ($caption)
		{
			$data['caption'] = $caption;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		if ($actions)
		{
			$data['actions'] = $actions;
		}

		if ($picture)
		{
			$data['picture'] = $picture;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user. Requires authentication.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
group's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($group, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the status if it
was created by the current user. Requires authentication.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}
}
PK'�[=*r�jjlink.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Link class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/link/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookLink extends JFacebookObject
{
	/**
	 * Method to get a link. Requires authentication and read_stream
permission for non-public links.
	 *
	 * @param   string  $link  The link id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLink($link)
	{
		return $this->get($link);
	}

	/**
	 * Method to get a link's comments. Requires authentication and
read_stream permission for non-public links.
	 *
	 * @param   string   $link    The link id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($link, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($link, 'comments', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   string  $link     The link id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($link, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($link, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get link's likes. Requires authentication and
read_stream permission for non-public links.
	 *
	 * @param   string   $link    The link id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($link, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($link, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   string  $link  The link id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($link)
	{
		return $this->createConnection($link, 'likes');
	}

	/**
	 * Method to unlike a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   string  $link  The link id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($link)
	{
		return $this->deleteConnection($link, 'likes');
	}
}
PK'�[�*���note.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Note class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/note/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookNote extends JFacebookObject
{
	/**
	 * Method to get a note. Requires authentication and user_notes or
friends_notes permission for non-public notes.
	 *
	 * @param   string  $note  The note id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getNote($note)
	{
		return $this->get($note);
	}

	/**
	 * Method to get a note's comments. Requires authentication and
user_notes or friends_notes permission for non-public notes.
	 *
	 * @param   string   $note    The note id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($note, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($note, 'comments', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a note. Requires authentication and publish_stream
and user_notes or friends_notes permissions.
	 *
	 * @param   string  $note     The note id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($note, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($note, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
and user_notes or friends_notes permissions.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get note's likes. Requires authentication and user_notes
or friends_notes for non-public notes.
	 *
	 * @param   string   $note    The note id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($note, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($note, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a note. Requires authentication and publish_stream and
user_notes or friends_notes permissions.
	 *
	 * @param   string  $note  The note id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($note)
	{
		return $this->createConnection($note, 'likes');
	}

	/**
	 * Method to unlike a note. Requires authentication and publish_stream and
user_notes or friends_notes permissions.
	 *
	 * @param   string  $note  The note id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($note)
	{
		return $this->deleteConnection($note, 'likes');
	}
}
PK'�[z3T�QQ	oauth.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

use Joomla\Registry\Registry;

/**
 * Joomla Platform class for generating Facebook API access token.
 *
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookOAuth extends JOAuth2Client
{
	/**
	 * @var    Registry Options for the JFacebookOAuth object.
	 * @since  3.2.0
	 */
	protected $options;

	/**
	 * Constructor.
	 *
	 * @param   Registry  $options  JFacebookOauth options object.
	 * @param   JHttp     $client   The HTTP client object.
	 * @param   JInput    $input    The input object.
	 *
	 * @since   3.2.0
	 */
	public function __construct(Registry $options = null, JHttp $client =
null, JInput $input = null)
	{
		$this->options = isset($options) ? $options : new Registry;

		// Setup the authentication and token urls if not already set.
		$this->options->def('authurl',
'http://www.facebook.com/dialog/oauth');
		$this->options->def('tokenurl',
'https://graph.facebook.com/oauth/access_token');

		// Call the JOAuth2Client constructor to setup the object.
		parent::__construct($this->options, $client, $input);
	}

	/**
	 * Method used to set permissions.
	 *
	 * @param   string  $scope  Comma separated list of permissions.
	 *
	 * @return  JFacebookOauth  This object for method chaining
	 *
	 * @since   3.2.0
	 */
	public function setScope($scope)
	{
		$this->setOption('scope', $scope);

		return $this;
	}

	/**
	 * Method to get the current scope
	 *
	 * @return  string Comma separated list of permissions.
	 *
	 * @since   3.2.0
	 */
	public function getScope()
	{
		return $this->getOption('scope');
	}
}
PK'�[��b3TT
object.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

use Joomla\Registry\Registry;

/**
 * Facebook API object class for the Joomla Platform.
 *
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
abstract class JFacebookObject
{
	/**
	 * @var    Registry  Options for the Facebook object.
	 * @since  3.2.0
	 */
	protected $options;

	/**
	 * @var    JHttp  The HTTP client object to use in sending HTTP requests.
	 * @since  3.2.0
	 */
	protected $client;

	/**
	 * @var    JFacebookOAuth  The OAuth client.
	 * @since  3.2.0
	 */
	protected $oauth;

	/**
	 * Constructor.
	 *
	 * @param   Registry        $options  Facebook options object.
	 * @param   JHttp           $client   The HTTP client object.
	 * @param   JFacebookOAuth  $oauth    The OAuth client.
	 *
	 * @since   3.2.0
	 */
	public function __construct(Registry $options = null, JHttp $client =
null, JFacebookOAuth $oauth = null)
	{
		$this->options = isset($options) ? $options : new Registry;
		$this->client = isset($client) ? $client : new
JHttp($this->options);
		$this->oauth = $oauth;
	}

	/**
	 * Method to build and return a full request URL for the request.  This
method will
	 * add appropriate pagination details if necessary and also prepend the
API url
	 * to have a complete URL for the request.
	 *
	 * @param   string   $path    URL to inflect.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   integer  $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   integer  $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  string  The request URL.
	 *
	 * @since   3.2.0
	 */
	protected function fetchUrl($path, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		// Get a new JUri object fousing the api url and given path.
		$uri = new JUri($this->options->get('api.url') . $path);

		if ($limit > 0)
		{
			$uri->setVar('limit', (int) $limit);
		}

		if ($offset > 0)
		{
			$uri->setVar('offset', (int) $offset);
		}

		if ($until != null)
		{
			$uri->setVar('until', $until);
		}

		if ($since != null)
		{
			$uri->setVar('since', $since);
		}

		return (string) $uri;
	}

	/**
	 * Method to send the request.
	 *
	 * @param   string   $path     The path of the request to make.
	 * @param   mixed    $data     Either an associative array or a string to
be sent with the post request.
	 * @param   array    $headers  An array of name-value pairs to include in
the header of the request
	 * @param   integer  $limit    The number of objects per page.
	 * @param   integer  $offset   The object's number on the page.
	 * @param   string   $until    A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since    A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return   mixed  The request response.
	 *
	 * @since    3.2.0
	 * @throws   DomainException
	 */
	public function sendRequest($path, $data = '', array $headers =
null, $limit = 0, $offset = 0, $until = null, $since = null)
	{
		// Send the request.
		$response = $this->client->get($this->fetchUrl($path, $limit,
$offset, $until, $since), $headers);

		$response = json_decode($response->body);

		// Validate the response.
		if (property_exists($response, 'error'))
		{
			throw new RuntimeException($response->error->message);
		}

		return $response;
	}

	/**
	 * Method to get an object.
	 *
	 * @param   string  $object  The object id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function get($object)
	{
		if ($this->oauth != null)
		{
			if ($this->oauth->isAuthenticated())
			{
				$response = $this->oauth->query($this->fetchUrl($object));

				return json_decode($response->body);
			}
			else
			{
				return false;
			}
		}

		// Send the request.
		return $this->sendRequest($object);
	}

	/**
	 * Method to get object's connection.
	 *
	 * @param   string   $object       The object id.
	 * @param   string   $connection   The object's connection name.
	 * @param   string   $extraFields  URL fields.
	 * @param   integer  $limit        The number of objects per page.
	 * @param   integer  $offset       The object's number on the page.
	 * @param   string   $until        A unix timestamp or any date accepted
by strtotime.
	 * @param   string   $since        A unix timestamp or any date accepted
by strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getConnection($object, $connection = null, $extraFields =
'', $limit = 0, $offset = 0, $until = null, $since = null)
	{
		$path = $object . '/' . $connection . $extraFields;

		if ($this->oauth != null)
		{
			if ($this->oauth->isAuthenticated())
			{
				$response = $this->oauth->query($this->fetchUrl($path, $limit,
$offset, $until, $since));

				if (strcmp($response->body, ''))
				{
					return json_decode($response->body);
				}
				else
				{
					return $response->headers['Location'];
				}
			}
			else
			{
				return false;
			}
		}

		// Send the request.
		return $this->sendRequest($path, '', null, $limit, $offset,
$until, $since);
	}

	/**
	 * Method to create a connection.
	 *
	 * @param   string  $object      The object id.
	 * @param   string  $connection  The object's connection name.
	 * @param   array   $parameters  The POST request parameters.
	 * @param   array   $headers     An array of name-value pairs to include
in the header of the request
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createConnection($object, $connection = null, $parameters
= null, array $headers = null)
	{
		if ($this->oauth->isAuthenticated())
		{
			// Build the request path.
			if ($connection != null)
			{
				$path = $object . '/' . $connection;
			}
			else
			{
				$path = $object;
			}

			// Send the post request.
			$response = $this->oauth->query($this->fetchUrl($path),
$parameters, $headers, 'post');

			return json_decode($response->body);
		}
		else
		{
			return false;
		}
	}

	/**
	 * Method to delete a connection.
	 *
	 * @param   string  $object       The object id.
	 * @param   string  $connection   The object's connection name.
	 * @param   string  $extraFields  URL fields.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deleteConnection($object, $connection = null, $extraFields
= '')
	{
		if ($this->oauth->isAuthenticated())
		{
			// Build the request path.
			if ($connection != null)
			{
				$path = $object . '/' . $connection . $extraFields;
			}
			else
			{
				$path = $object . $extraFields;
			}

			// Send the delete request.
			$response = $this->oauth->query($this->fetchUrl($path), null,
array(), 'delete');

			return json_decode($response->body);
		}
		else
		{
			return false;
		}
	}

	/**
	 * Method used to set the OAuth client.
	 *
	 * @param   JFacebookOAuth  $oauth  The OAuth client object.
	 *
	 * @return  JFacebookObject  This object for method chaining.
	 *
	 * @since   3.2.0
	 */
	public function setOAuth($oauth)
	{
		$this->oauth = $oauth;

		return $this;
	}

	/**
	 * Method used to get the OAuth client.
	 *
	 * @return  JFacebookOAuth  The OAuth client
	 *
	 * @since   3.2.0
	 */
	public function getOAuth()
	{
		return $this->oauth;
	}
}
PK'�[�'��	photo.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Photo class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/photo/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookPhoto extends JFacebookObject
{
	/**
	 * Method to get a photo. Requires authentication and user_photos or
friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhoto($photo)
	{
		return $this->get($photo);
	}

	/**
	 * Method to get a photo's comments. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($photo, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($photo, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a photo. Requires authentication and
publish_stream permission, user_photos or friends_photos permission for
private photos.
	 *
	 * @param   string  $photo    The photo id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($photo, $message)
	{
		// Set POST request parameters.
		$data['message'] = $message;

		return $this->createConnection($photo, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get photo's likes. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($photo)
	{
		return $this->createConnection($photo, 'likes');
	}

	/**
	 * Method to unlike a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($photo)
	{
		return $this->deleteConnection($photo, 'likes');
	}

	/**
	 * Method to get the Users tagged in the photo. Requires authentication
and user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getTags($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'tags', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to tag one or more Users in a photo. $to or $tagText required.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo    The photo id.
	 * @param   mixed    $to       ID of the User or an array of Users to tag
in the photo: [{"id":"1234"},
{"id":"12345"}].
	 * @param   string   $tagText  A text string to tag.
	 * @param   integer  $x        x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y        y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createTag($photo, $to = null, $tagText = null, $x = null,
$y = null)
	{
		// Set POST request parameters.
		if (is_array($to))
		{
			$data['tags'] = $to;
		}
		else
		{
			$data['to'] = $to;
		}

		if ($tagText)
		{
			$data['tag_text'] = $tagText;
		}

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to update the position of the tag for a particular Users in a
photo.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo  The photo id.
	 * @param   string   $to     ID of the User to update tag in the photo.
	 * @param   integer  $x      x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y      y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function updateTag($photo, $to, $x = null, $y = null)
	{
		// Set POST request parameters.
		$data['to'] = $to;

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to get the album-sized view of the photo. Requires
authentication and user_photos or friends_photos permission for private
photos.
	 *
	 * @param   string   $photo     The photo id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 *
	 * @return  string  URL of the picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($photo, $redirect = true)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		return $this->getConnection($photo, 'picture',
$extra_fields);
	}
}
PK'�[�Jloopost.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Post class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/post/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookPost extends JFacebookObject
{
	/**
	 * Method to get a post. Requires authentication and read_stream
permission for all data.
	 *
	 * @param   string  $post  The post id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPost($post)
	{
		return $this->get($post);
	}

	/**
	 * Method to delete a post if it was created by this application. Requires
authentication and publish_stream permission
	 *
	 * @param   string  $post  The post id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to get a post's comments. Requires authentication and
read_stream permission.
	 *
	 * @param   string   $post    The post id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($post, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($post, 'comments', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a post. Requires authentication and publish_stream
permission
	 *
	 * @param   string  $post     The post id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($post, $message)
	{
		// Set POST request parameters.
		$data['message'] = $message;

		return $this->createConnection($post, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get post's likes. Requires authentication and
read_stream permission.
	 *
	 * @param   string   $post    The post id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($post, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($post, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a post. Requires authentication and publish_stream
permission
	 *
	 * @param   string  $post  The post id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($post)
	{
		return $this->createConnection($post, 'likes');
	}

	/**
	 * Method to unlike a post. Requires authentication and publish_stream
permission
	 *
	 * @param   string  $post  The post id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($post)
	{
		return $this->deleteConnection($post, 'likes');
	}
}
PK'�[�)O""
status.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Status class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/status/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookStatus extends JFacebookObject
{
	/**
	 * Method to get a status message. Requires authentication.
	 *
	 * @param   string  $status  The status message id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getStatus($status)
	{
		return $this->get($status);
	}

	/**
	 * Method to get a status message's comments. Requires
authentication.
	 *
	 * @param   string   $status  The status message id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($status, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($status, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to post a comment to the status message. Requires authentication
and publish_stream and user_status or friends_status permission.
	 *
	 * @param   string  $status   The status message id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($status, $message)
	{
		// Set POST request parameters.
		$data['message'] = $message;

		return $this->createConnection($status, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
and user_status or friends_status permission.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get a status message's likes. Requires authentication.
	 *
	 * @param   string   $status  The status message id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($status, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($status, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like status message. Requires authentication and
publish_stream and user_status or friends_status permission.
	 *
	 * @param   string  $status  The status message id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLike($status)
	{
		return $this->createConnection($status, 'likes');
	}

	/**
	 * Method to unlike a status message. Requires authentication and
publish_stream and user_status or friends_status permission.
	 *
	 * @param   string  $status  The status message id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($status)
	{
		return $this->deleteConnection($status, 'likes');
	}
}
PK'�[�)0��user.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API User class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/user/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookUser extends JFacebookObject
{
	/**
	 * Method to get the specified user's details. Authentication is
required only for some fields.
	 *
	 * @param   mixed  $user  Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getUser($user)
	{
		return $this->get($user);
	}

	/**
	 * Method to get the specified user's friends. Requires
authentication.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFriends($user, $limit = 0, $offset = 0)
	{
		return $this->getConnection($user, 'friends', '',
$limit, $offset);
	}

	/**
	 * Method to get the user's incoming friend requests. Requires
authentication and read_requests permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFriendRequests($user, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($user, 'friendrequests',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to get the user's friend lists. Requires authentication and
read_friendlists permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFriendLists($user, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($user, 'friendlists',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to get the user's wall. Requires authentication and
read_stream permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the user's news feed. Requires authentication and
read_stream permission.
	 *
	 * @param   mixed    $user      Either an integer containing the user ID
or a string containing the username.
	 * @param   string   $filter    User's stream filter.
	 * @param   boolean  $location  Retrieve only posts with a location
attached.
	 * @param   integer  $limit     The number of objects per page.
	 * @param   integer  $offset    The object's number on the page.
	 * @param   string   $until     A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since     A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getHome($user, $filter = null, $location = false, $limit =
0, $offset = 0, $until = null, $since = null)
	{
		$extra_fields = '';

		if ($filter != null)
		{
			$extra_fields = '?filter=' . $filter;
		}

		if ($location == true)
		{
			$extra_fields .= (strpos($extra_fields, '?') === false) ?
'?with=location' : '&with=location';
		}

		return $this->getConnection($user, 'home', $extra_fields,
$limit, $offset, $until, $since);
	}

	/**
	 * Method to see if a user is a friend of the current user. Requires
authentication.
	 *
	 * @param   mixed  $currentUser  Either an integer containing the user ID
or a string containing the username for the current user.
	 * @param   mixed  $user         Either an integer containing the user ID
or a string containing the username for the user.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function hasFriend($currentUser, $user)
	{
		return $this->getConnection($currentUser, 'friends/' .
$user);
	}

	/**
	 * Method to get mutual friends of one user and the current user. Requires
authentication.
	 *
	 * @param   mixed    $currentUser  Either an integer containing the user
ID or a string containing the username for the current user.
	 * @param   mixed    $user         Either an integer containing the user
ID or a string containing the username for the user.
	 * @param   integer  $limit        The number of objects per page.
	 * @param   integer  $offset       The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMutualFriends($currentUser, $user, $limit = 0, $offset
= 0)
	{
		return $this->getConnection($currentUser, 'mutualfriends/' .
$user, '', $limit, $offset);
	}

	/**
	 * Method to get the user's profile picture. Requires authentication.
	 *
	 * @param   mixed    $user      Either an integer containing the user ID
or a string containing the username.
	 * @param   boolean  $redirect  If false this will return the URL of the
profile picture without a 302 redirect.
	 * @param   string   $type      To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the user's profile picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($user, $redirect = true, $type = null)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		if ($type != null)
		{
			$extra_fields .= (strpos($extra_fields, '?') === false) ?
'?type=' . $type : '&type=' . $type;
		}

		return $this->getConnection($user, 'picture',
$extra_fields);
	}

	/**
	 * Method to get the user's family relationships. Requires
authentication and user_relationships permission..
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFamily($user, $limit = 0, $offset = 0)
	{
		return $this->getConnection($user, 'family', '',
$limit, $offset);
	}

	/**
	 * Method to get the user's notifications. Requires authentication
and manage_notifications permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   boolean  $read    Enables you to see notifications that the
user has already read.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getNotifications($user, $read = null, $limit = 0, $offset
= 0, $until = null, $since = null)
	{
		if ($read == true)
		{
			$read = '?include_read=1';
		}

		// Send the request.
		return $this->getConnection($user, 'notifications', $read,
$limit, $offset, $until, $since);
	}

	/**
	 * Method to mark a notification as read. Requires authentication and
manage_notifications permission.
	 *
	 * @param   string  $notification  The notification id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function updateNotification($notification)
	{
		$data['unread'] = 0;

		return $this->createConnection($notification, null, $data);
	}

	/**
	 * Method to get the user's permissions. Requires authentication.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPermissions($user, $limit = 0, $offset = 0)
	{
		return $this->getConnection($user, 'permissions',
'', $limit, $offset);
	}

	/**
	 * Method to revoke a specific permission on behalf of a user. Requires
authentication.
	 *
	 * @param   mixed   $user        Either an integer containing the user ID
or a string containing the username.
	 * @param   string  $permission  The permission to revoke. If none
specified, then this will de-authorize the application completely.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deletePermission($user, $permission = '')
	{
		return $this->deleteConnection($user, 'permissions',
'?permission=' . $permission);
	}

	/**
	 * Method to get the user's albums. Requires authentication and
user_photos or friends_photos permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getAlbums($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'albums', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to create an album for a user.  Requires authentication and
publish_stream permission.
	 *
	 * @param   mixed   $user         Either an integer containing the user ID
or a string containing the username.
	 * @param   string  $name         Album name.
	 * @param   string  $description  Album description.
	 * @param   string  $privacy      A JSON-encoded object that defines the
privacy setting for the album.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createAlbum($user, $name, $description = null, $privacy =
null)
	{
		// Set POST request parameters.
		$data = array();
		$data['name'] = $name;
		$data['description'] = $description;
		$data['privacy'] = $privacy;

		return $this->createConnection($user, 'albums', $data);
	}

	/**
	 * Method to get the user's checkins. Requires authentication and
user_checkins or friends_checkins permission
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getCheckins($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'checkins', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to create a checkin for a user. Requires authentication and
publish_checkins permission.
	 *
	 * @param   mixed   $user         Either an integer containing the user ID
or a string containing the username.
	 * @param   string  $place        Id of the Place Page.
	 * @param   string  $coordinates  A JSON-encoded string containing
latitute and longitude.
	 * @param   string  $tags         Comma separated list of USER_IDs.
	 * @param   string  $message      A message to add to the checkin.
	 * @param   string  $link         A link to add to the checkin.
	 * @param   string  $picture      A picture to add to the checkin.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createCheckin($user, $place, $coordinates, $tags = null,
$message = null, $link = null, $picture = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['place'] = $place;
		$data['coordinates'] = $coordinates;
		$data['tags'] = $tags;
		$data['message'] = $message;
		$data['link'] = $link;
		$data['picture'] = $picture;

		return $this->createConnection($user, 'checkins', $data);
	}

	/**
	 * Method to get the user's likes. Requires authentication and
user_likes or friends_likes permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to see if a user likes a specific Page. Requires authentication.
	 *
	 * @param   mixed   $user  Either an integer containing the user ID or a
string containing the username.
	 * @param   string  $page  Facebook ID of the Page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function likesPage($user, $page)
	{
		return $this->getConnection($user, 'likes/' . $page);
	}

	/**
	 * Method to get the current user's events. Requires authentication
and user_events or friends_events permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getEvents($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'events', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to create an event for a user. Requires authentication
create_event permission.
	 *
	 * @param   mixed   $user         Either an integer containing the user ID
or a string containing the username.
	 * @param   string  $name         Event name.
	 * @param   string  $startTime    Event start time as UNIX timestamp.
	 * @param   string  $endTime      Event end time as UNIX timestamp.
	 * @param   string  $description  Event description.
	 * @param   string  $location     Event location.
	 * @param   string  $locationId   Facebook Place ID of the place the Event
is taking place.
	 * @param   string  $privacyType  Event privacy setting, a string
containing 'OPEN' (default), 'CLOSED', or
'SECRET'.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createEvent($user, $name, $startTime, $endTime = null,
$description = null,
		$location = null, $locationId = null, $privacyType = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['start_time'] = $startTime;
		$data['name'] = $name;
		$data['end_time'] = $endTime;
		$data['description'] = $description;
		$data['location'] = $location;
		$data['location_id'] = $locationId;
		$data['privacy_type'] = $privacyType;

		return $this->createConnection($user, 'events', $data);
	}

	/**
	 * Method to edit an event. Requires authentication create_event
permission.
	 *
	 * @param   mixed   $event        Event ID.
	 * @param   string  $name         Event name.
	 * @param   string  $startTime    Event start time as UNIX timestamp.
	 * @param   string  $endTime      Event end time as UNIX timestamp.
	 * @param   string  $description  Event description.
	 * @param   string  $location     Event location.
	 * @param   string  $locationId   Facebook Place ID of the place the Event
is taking place.
	 * @param   string  $privacyType  Event privacy setting, a string
containing 'OPEN' (default), 'CLOSED', or
'SECRET'.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function editEvent($event, $name = null, $startTime = null,
$endTime = null, $description = null,
		$location = null, $locationId = null, $privacyType = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['start_time'] = $startTime;
		$data['name'] = $name;
		$data['end_time'] = $endTime;
		$data['description'] = $description;
		$data['location'] = $location;
		$data['location_id'] = $locationId;
		$data['privacy_type'] = $privacyType;

		return $this->createConnection($event, null, $data);
	}

	/**
	 * Method to delete an event. Note: you can only delete the event if it
was created by the same app. Requires authentication create_event
permission.
	 *
	 * @param   string  $event  Event ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteEvent($event)
	{
		return $this->deleteConnection($event);
	}

	/**
	 * Method to get the groups that the user belongs to. Requires
authentication and user_groups or friends_groups permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getGroups($user, $limit = 0, $offset = 0)
	{
		return $this->getConnection($user, 'groups', '',
$limit, $offset);
	}

	/**
	 * Method to get the user's posted links. Requires authentication and
user_groups or friends_groups permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLinks($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'links', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a link on user's feed. Requires authentication and
publish_stream permission.
	 *
	 * @param   mixed   $user     Either an integer containing the user ID or
a string containing the username.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($user, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;
		$data['message'] = $message;

		return $this->createConnection($user, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to get the user's notes. Requires authentication and
user_groups or friends_groups permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getNotes($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'notes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to create a note on the behalf of the user.
	 * Requires authentication and publish_stream permission, user_groups or
friends_groups permission.
	 *
	 * @param   mixed   $user     Either an integer containing the user ID or
a string containing the username.
	 * @param   string  $subject  The subject of the note.
	 * @param   string  $message  Note content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createNote($user, $subject, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['subject'] = $subject;
		$data['message'] = $message;

		return $this->createConnection($user, 'notes', $data);
	}

	/**
	 * Method to get the user's photos. Requires authentication and
user_groups or friends_groups permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhotos($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'photos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a photo on user's wall. Requires authentication and
publish_stream permission, user_groups or friends_groups permission.
	 *
	 * @param   mixed    $user     Either an integer containing the user ID or
a string containing the username.
	 * @param   string   $source   Path to photo.
	 * @param   string   $message  Photo description.
	 * @param   string   $place    Facebook ID of the place associated with
the photo.
	 * @param   boolean  $noStory  If set to 1, optionally suppresses the feed
story that is automatically
	 *                             generated on a user’s profile when they
upload a photo using your application.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPhoto($user, $source, $message = null, $place =
null, $noStory = null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);
		$data['message'] = $message;
		$data['place'] = $place;
		$data['no_story'] = $noStory;

		return $this->createConnection($user, 'photos', $data,
array('Content-Type' => 'multipart/form-data'));
	}

	/**
	 * Method to get the user's posts. Requires authentication and
read_stream permission for non-public posts.
	 *
	 * @param   mixed    $user      Either an integer containing the user ID
or a string containing the username.
	 * @param   boolean  $location  Retrieve only posts with a location
attached.
	 * @param   integer  $limit     The number of objects per page.
	 * @param   integer  $offset    The object's number on the page.
	 * @param   string   $until     A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since     A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPosts($user, $location = false, $limit = 0, $offset =
0, $until = null, $since = null)
	{
		if ($location == true)
		{
			$location = '?with=location';
		}

		// Send the request.
		return $this->getConnection($user, 'posts', $location,
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post on a user's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   mixed   $user              Either an integer containing the
user ID or a string containing the username.
	 * @param   string  $message           Post message.
	 * @param   string  $link              Post URL.
	 * @param   string  $picture           Post thumbnail image (can only be
used if link is specified)
	 * @param   string  $name              Post name (can only be used if link
is specified).
	 * @param   string  $caption           Post caption (can only be used if
link is specified).
	 * @param   string  $description       Post description (can only be used
if link is specified).
	 * @param   array   $actions           Post actions array of objects
containing name and link.
	 * @param   string  $place             Facebook Page ID of the location
associated with this Post.
	 * @param   string  $tags              Comma-separated list of Facebook
IDs of people tagged in this Post.
	 *                                     For example: 1207059,701732. You
cannot specify this field without also specifying a place.
	 * @param   string  $privacy           Post privacy settings (can only be
specified if the Timeline being posted
	 *                                     on belongs to the User creating the
Post).
	 * @param   string  $objectAttachment  Facebook ID for an existing picture
in the User's photo albums to use as the thumbnail image.
	 *                                     The User must be the owner of the
photo, and the photo cannot be part of a message attachment.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($user, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null, $place = null, $tags = null,
$privacy = null, $objectAttachment = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;
		$data['link'] = $link;
		$data['name'] = $name;
		$data['caption'] = $caption;
		$data['description'] = $description;
		$data['actions'] = $actions;
		$data['place'] = $place;
		$data['tags'] = $tags;
		$data['privacy'] = $privacy;
		$data['object_attachment'] = $objectAttachment;
		$data['picture'] = $picture;

		return $this->createConnection($user, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user. Requires authentication
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to get the user's statuses. Requires authentication
read_stream permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getStatuses($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'statuses', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a status message on behalf of the user. Requires
authentication publish_stream permission.
	 *
	 * @param   mixed   $user     Either an integer containing the user ID or
a string containing the username.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($user, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($user, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication publish_stream permission.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}

	/**
	 * Method to get the videos the user has been tagged in. Requires
authentication and user_videos or friends_videos permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getVideos($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'videos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a video on behalf of the user. Requires authentication
and publish_stream permission.
	 *
	 * @param   mixed   $user         Either an integer containing the user ID
or a string containing the username.
	 * @param   string  $source       Path to video.
	 * @param   string  $title        Video title.
	 * @param   string  $description  Video description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createVideo($user, $source, $title = null, $description =
null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);
		$data['title'] = $title;
		$data['description'] = $description;

		return $this->createConnection($user, 'videos', $data,
array('Content-Type' => 'multipart/form-data'));
	}

	/**
	 * Method to get the posts the user has been tagged in. Requires
authentication and user_videos or friends_videos permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getTagged($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'tagged', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the activities listed on the user's profile.
Requires authentication and user_activities or friends_activities
permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getActivities($user, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($user, 'activities',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to get the books listed on the user's profile. Requires
authentication and user_likes or friends_likes permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getBooks($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'books', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the interests listed on the user's profile. Requires
authentication.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getInterests($user, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($user, 'interests',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to get the movies listed on the user's profile. Requires
authentication and user_likes or friends_likes permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMovies($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'movies', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the television listed on the user's profile.
Requires authentication and user_likes or friends_likes permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getTelevision($user, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($user, 'television',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to get the music listed on the user's profile. Requires
authentication user_likes or friends_likes permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMusic($user, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($user, 'music', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the user's subscribers. Requires authentication and
user_subscriptions or friends_subscriptions permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getSubscribers($user, $limit = 0, $offset = 0)
	{
		return $this->getConnection($user, 'subscribers',
'', $limit, $offset);
	}

	/**
	 * Method to get the people the user is subscribed to. Requires
authentication and user_subscriptions or friends_subscriptions permission.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the username.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getSubscribedTo($user, $limit = 0, $offset = 0)
	{
		return $this->getConnection($user, 'subscribedto',
'', $limit, $offset);
	}
}
PK'�[H�����	video.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Video class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/video/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookVideo extends JFacebookObject
{
	/**
	 * Method to get a video. Requires authentication and user_videos or
friends_videos permission for private videos.
	 *
	 * @param   string  $video  The video id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getVideo($video)
	{
		return $this->get($video);
	}

	/**
	 * Method to get a video's comments. Requires authentication and
user_videos or friends_videos permission for private videos.
	 *
	 * @param   string   $video   The video id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($video, $limit=0, $offset=0, $until=null,
$since=null)
	{
		return $this->getConnection($video, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a video. Requires authentication and
publish_stream permission, user_videos or friends_videos permission for
private videos.
	 *
	 * @param   string  $video    The video id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($video, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($video, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission, user_videos or friends_videos permission for private videos.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get video's likes. Requires authentication and
user_videos or friends_videos permission for private videos.
	 *
	 * @param   string   $video   The video id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($video, $limit=0, $offset=0, $until=null,
$since=null)
	{
		return $this->getConnection($video, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a video. Requires authentication and publish_stream
permission, user_videos or friends_videos permission for private videos.
	 *
	 * @param   string  $video  The video id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($video)
	{
		return $this->createConnection($video, 'likes');
	}

	/**
	 * Method to unlike a video. Requires authentication and publish_stream
permission, user_videos or friends_videos permission for private videos.
	 *
	 * @param   string  $video  The video id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($video)
	{
		return $this->deleteConnection($video, 'likes');
	}

	/**
	 * Method to get the album-sized view of the video. Requires
authentication and user_videos or friends_videos permission for private
photos.
	 *
	 * @param   string  $video  The video id.
	 *
	 * @return  string  URL of the picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($video)
	{
		return $this->getConnection($video, 'picture');
	}
}
PK'�[&
:iQQ	album.phpnu�[���PK'�[�R�GG�checkin.phpnu�[���PK'�[�)comment.phpnu�[���PK'�[�>n~$A$A	_8event.phpnu�[���PK'�[�Z�����yfacebook.phpnu�[���PK'�[H�'yy	��group.phpnu�[���PK'�[=*r�jjF�link.phpnu�[���PK'�[�*����note.phpnu�[���PK'�[z3T�QQ	�oauth.phpnu�[���PK'�[��b3TT
��object.phpnu�[���PK'�[�'��	5�photo.phpnu�[���PK'�[�JlooI
post.phpnu�[���PK'�[�)O""
�status.phpnu�[���PK'�[�)0��L+user.phpnu�[���PK'�[H�����	��video.phpnu�[���PKL��