User

Extends \Joomla\Facebook\Object

Facebook API User class for the Joomla Framework.

deprecated
link

https://developers.facebook.com/docs/reference/api/user/

since

1.0

deprecated

The joomla/facebook package is deprecated

Methods

__construct

Constructor.

__construct(array $options = array(), \Joomla\Http\Http $client = null, \Joomla\Facebook\OAuth $oauth = null) 
inherited
since

1.2.0

Arguments

$options

arrayFacebook options array.

$client

\Joomla\Http\HttpThe HTTP client object.

$oauth

\Joomla\Facebook\OAuthThe OAuth client.

createAlbum

Method to create an album for a user. Requires authentication and publish_stream permission.

createAlbum(mixed $user, string $name, string $description = null, string $privacy = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$name

stringAlbum name.

$description

stringAlbum description.

$privacy

stringA JSON-encoded object that defines the privacy setting for the album.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createCheckin

Method to create a checkin for a user. Requires authentication and publish_checkins permission.

createCheckin(mixed $user, string $place, string $coordinates, string $tags = null, string $message = null, string $link = null, string $picture = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$place

stringId of the Place Page.

$coordinates

stringA JSON-encoded string containing latitute and longitude.

$tags

stringComma separated list of USER_IDs.

$message

stringA message to add to the checkin.

$link

stringA link to add to the checkin.

$picture

stringA picture to add to the checkin.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createConnection

Method to create a connection.

createConnection(string $object, string $connection = null, array $parameters = null, array $headers = array()) : mixed
inherited
since

1.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$parameters

arrayThe POST request parameters.

$headers

arrayAn array of name-value pairs to include in the header of the request

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createEvent

Method to create an event for a user. Requires authentication create_event permission.

createEvent(mixed $user, string $name, string $startTime, string $endTime = null, string $description = null, string $location = null, string $locationId = null, string $privacyType = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$name

stringEvent name.

$startTime

stringEvent start time as UNIX timestamp.

$endTime

stringEvent end time as UNIX timestamp.

$description

stringEvent description.

$location

stringEvent location.

$locationId

stringFacebook Place ID of the place the Event is taking place.

$privacyType

stringEvent privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createNote

Method to create a note on the behalf of the user.

createNote(mixed $user, string $subject, string $message) : mixed

Requires authentication and publish_stream permission, user_groups or friends_groups permission.

since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$subject

stringThe subject of the note.

$message

stringNote content.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createPhoto

Method to post a photo on user's wall. Requires authentication and publish_stream permission, user_groups or friends_groups permission.

createPhoto(mixed $user, string $source, string $message = null, string $place = null, boolean $noStory = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$source

stringPath to photo.

$message

stringPhoto description.

$place

stringFacebook ID of the place associated with the photo.

$noStory

booleanIf 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.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createPost

Method to post on a user's wall. Message or link parameter is required. Requires authentication and publish_stream permission.

createPost(mixed $user, string $message = null, string $link = null, string $picture = null, string $name = null, string $caption = null, string $description = null, array $actions = null, string $place = null, string $tags = null, string $privacy = null, string $objectAttachment = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$message

stringPost message.

$link

stringPost URL.

$picture

stringPost thumbnail image (can only be used if link is specified)

$name

stringPost name (can only be used if link is specified).

$caption

stringPost caption (can only be used if link is specified).

$description

stringPost description (can only be used if link is specified).

$actions

arrayPost actions array of objects containing name and link.

$place

stringFacebook Page ID of the location associated with this Post.

$tags

stringComma-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.

$privacy

stringPost privacy settings (can only be specified if the Timeline being posted on belongs to the User creating the Post).

$objectAttachment

stringFacebook 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.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createStatus

Method to post a status message on behalf of the user. Requires authentication publish_stream permission.

createStatus(mixed $user, string $message) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$message

stringStatus message content.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

createVideo

Method to post a video on behalf of the user. Requires authentication and publish_stream permission.

createVideo(mixed $user, string $source, string $title = null, string $description = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$source

stringPath to video.

$title

stringVideo title.

$description

stringVideo description.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

deleteConnection

Method to delete a connection.

deleteConnection(string $object, string $connection = null, string $extraFields = '') : mixed
inherited
since

1.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$extraFields

stringURL fields.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

deleteEvent

Method to delete an event.

deleteEvent(string $event) : boolean

Note: you can only delete the event if it was created by the same app. Requires authentication create_event permission.

since

1.0

Arguments

$event

stringEvent ID.

Response

booleanReturns true if successful, and false otherwise.

deletePermission

Method to revoke a specific permission on behalf of a user. Requires authentication.

deletePermission(mixed $user, string $permission = '') : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$permission

stringThe permission to revoke. If none specified, then this will de-authorize the application completely.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

deletePost

Method to delete a post. Note: you can only delete the post if it was created by the current user. Requires authentication

deletePost(string $post) : mixed
since

1.0

Arguments

$post

stringThe Post ID.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

deleteStatus

Method to delete a status. Note: you can only delete the post if it was created by the current user.

deleteStatus(string $status) : mixed

Requires authentication publish_stream permission.

since

1.0

Arguments

$status

stringThe Status ID.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

editEvent

Method to edit an event. Requires authentication create_event permission.

editEvent(mixed $event, string $name = null, string $startTime = null, string $endTime = null, string $description = null, string $location = null, string $locationId = null, string $privacyType = null) : mixed
since

1.0

Arguments

$event

mixedEvent ID.

$name

stringEvent name.

$startTime

stringEvent start time as UNIX timestamp.

$endTime

stringEvent end time as UNIX timestamp.

$description

stringEvent description.

$location

stringEvent location.

$locationId

stringFacebook Place ID of the place the Event is taking place.

$privacyType

stringEvent privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

fetchUrl

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.

fetchUrl(string $path, integer $limit, integer $offset, string $until = null, string $since = null) : string
inherited
since

1.2.0

Arguments

$path

stringURL to inflect.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

stringThe request URL.

get

Method to get an object.

get(string $object) : mixed
inherited
since

1.2.0

Arguments

$object

stringThe object id.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getActivities

Method to get the activities listed on the user's profile. Requires authentication and user_activities or friends_activities permission.

getActivities(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getAlbums

Method to get the user's albums. Requires authentication and user_photos or friends_photos permission.

getAlbums(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getBooks

Method to get the books listed on the user's profile. Requires authentication and user_likes or friends_likes permission.

getBooks(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getCheckins

Method to get the user's checkins. Requires authentication and user_checkins or friends_checkins permission

getCheckins(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getConnection

Method to get object's connection.

getConnection(string $object, string $connection = null, string $extraFields = '', integer $limit, integer $offset, string $until = null, string $since = null) : mixed
inherited
since

1.2.0

Arguments

$object

stringThe object id.

$connection

stringThe object's connection name.

$extraFields

stringURL fields.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getEvents

Method to get the current user's events. Requires authentication and user_events or friends_events permission.

getEvents(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getFamily

Method to get the user's family relationships. Requires authentication and user_relationships permission.

getFamily(mixed $user, integer $limit, integer $offset) : mixed

.

since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getFeed

Method to get the user's wall. Requires authentication and read_stream permission.

getFeed(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getFriendLists

Method to get the user's friend lists. Requires authentication and read_friendlists permission.

getFriendLists(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getFriendRequests

Method to get the user's incoming friend requests. Requires authentication and read_requests permission.

getFriendRequests(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getFriends

Method to get the specified user's friends. Requires authentication.

getFriends(mixed $user, integer $limit, integer $offset) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getGroups

Method to get the groups that the user belongs to. Requires authentication and user_groups or friends_groups permission.

getGroups(mixed $user, integer $limit, integer $offset) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getHome

Method to get the user's news feed. Requires authentication and read_stream permission.

getHome(mixed $user, string $filter = null, boolean $location = false, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$filter

stringUser's stream filter.

$location

booleanRetreive only posts with a location attached.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getInterests

Method to get the interests listed on the user's profile. Requires authentication.

getInterests(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getLikes

Method to get the user's likes. Requires authentication and user_likes or friends_likes permission.

getLikes(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getMovies

Method to get the movies listed on the user's profile. Requires authentication and user_likes or friends_likes permission.

getMovies(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getMusic

Method to get the music listed on the user's profile. Requires authentication user_likes or friends_likes permission.

getMusic(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getMutualFriends

Method to get mutual friends of one user and the current user. Requires authentication.

getMutualFriends(mixed $currentUser, mixed $user, integer $limit, integer $offset) : mixed
since

1.0

Arguments

$currentUser

mixedEither an integer containing the user ID or a string containing the username for the current user.

$user

mixedEither an integer containing the user ID or a string containing the username for the user.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getNotes

Method to get the user's notes. Requires authentication and user_groups or friends_groups permission.

getNotes(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getNotifications

Method to get the user's notifications. Requires authentication and manage_notifications permission.

getNotifications(mixed $user, boolean $read = null, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$read

booleanEnables you to see notifications that the user has already read.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getOauth

Method used to get the OAuth client.

getOauth() : \Joomla\Facebook\OAuth
inherited
since

1.2.0

Response

\Joomla\Facebook\OAuthThe OAuth client

getPermissions

Method to get the user's permissions. Requires authentication.

getPermissions(mixed $user, integer $limit, integer $offset) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getPhotos

Method to get the user's photos. Requires authentication and user_groups or friends_groups permission.

getPhotos(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getPicture

Method to get the user's profile picture. Requires authentication.

getPicture(mixed $user, boolean $redirect = true, string $type = null) : string
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$redirect

booleanIf false this will return the URL of the profile picture without a 302 redirect.

$type

stringTo request a different photo use square | small | normal | large.

Response

stringThe URL to the user's profile picture.

getPosts

Method to get the user's posts. Requires authentication and read_stream permission for non-public posts.

getPosts(mixed $user, boolean $location = false, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$location

booleanRetreive only posts with a location attached.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getStatuses

Method to get the user's statuses. Requires authentication read_stream permission.

getStatuses(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getSubscribedTo

Method to get the people the user is subscribed to. Requires authentication and user_subscriptions or friends_subscriptions permission.

getSubscribedTo(mixed $user, integer $limit, integer $offset) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getSubscribers

Method to get the user's subscribers. Requires authentication and user_subscriptions or friends_subscriptions permission.

getSubscribers(mixed $user, integer $limit, integer $offset) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getTagged

Method to get the posts the user has been tagged in. Requires authentication and user_videos or friends_videos permission.

getTagged(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getTelevision

Method to get the television listed on the user's profile. Requires authentication and user_likes or friends_likes permission.

getTelevision(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getUser

Method to get the specified user's details. Authentication is required only for some fields.

getUser(mixed $user) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

getVideos

Method to get the videos the user has been tagged in. Requires authentication and user_videos or friends_videos permission.

getVideos(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

hasFriend

Method to see if a user is a friend of the current user. Requires authentication.

hasFriend(mixed $currentUser, mixed $user) : mixed
since

1.0

Arguments

$currentUser

mixedEither an integer containing the user ID or a string containing the username for the current user.

$user

mixedEither an integer containing the user ID or a string containing the username for the user.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

likesPage

Method to see if a user likes a specific Page. Requires authentication.

likesPage(mixed $user, string $page) : mixed
since

1.0

Arguments

$user

mixedEither an integer containing the user ID or a string containing the username.

$page

stringFacebook ID of the Page.

Response

mixedThe decoded JSON response or false if the client is not authenticated.

sendRequest

Method to send the request.

sendRequest(string $path, mixed $data = '', array $headers = array(), integer $limit, integer $offset, string $until = null, string $since = null) : mixed
inherited
since

1.2.0

throws

\RuntimeException

Arguments

$path

stringThe path of the request to make.

$data

mixedEither an associative array or a string to be sent with the post request.

$headers

arrayAn array of name-value pairs to include in the header of the request

$limit

integerThe number of objects per page.

$offset

integerThe object's number on the page.

$until

stringA unix timestamp or any date accepted by strtotime.

$since

stringA unix timestamp or any date accepted by strtotime.

Response

mixedThe request response.

setOauth

Method used to set the OAuth client.

setOauth(\Joomla\Facebook\OAuth $oauth) : \Joomla\Facebook\AbstractFacebookObject
inherited
since

1.2.0

Arguments

$oauth

\Joomla\Facebook\OAuthThe OAuth client object.

Response

\Joomla\Facebook\AbstractFacebookObjectThis object for method chaining.

updateNotification

Method to mark a notification as read. Requires authentication and manage_notifications permission.

updateNotification(string $notification) : boolean
since

1.0

Arguments

$notification

stringThe notification id.

Response

booleanReturns true if successful, and false otherwise.

Properties

options

Options for the Facebook object.

inherited
since

1.2.0

Type(s)

array

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.2.0

Type(s)

\Joomla\Http\Http

oauth

The OAuth client.

inherited
since

1.2.0

Type(s)

\Joomla\Facebook\OAuth