User
Extends \Joomla\Facebook\ObjectFacebook API User class for the Joomla Framework.
link | |
---|---|
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)
since |
1.2.0 |
---|
Arguments
- $options
array
Facebook options array.- $client
\Joomla\Http\Http
The HTTP client object.- $oauth
\Joomla\Facebook\OAuth
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $name
string
Album name.- $description
string
Album description.- $privacy
string
A JSON-encoded object that defines the privacy setting for the album.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $place
string
Id of the Place Page.- $coordinates
string
A JSON-encoded string containing latitute and longitude.- $tags
string
Comma separated list of USER_IDs.- $message
string
A message to add to the checkin.- $link
string
A link to add to the checkin.- $picture
string
A picture to add to the checkin.
Response
mixed
The 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
since |
1.2.0 |
---|
Arguments
- $object
string
The object id.- $connection
string
The object's connection name.- $parameters
array
The POST request parameters.- $headers
array
An array of name-value pairs to include in the header of the request
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $name
string
Event name.- $startTime
string
Event start time as UNIX timestamp.- $endTime
string
Event end time as UNIX timestamp.- $description
string
Event description.- $location
string
Event location.- $locationId
string
Facebook Place ID of the place the Event is taking place.- $privacyType
string
Event privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'.
Response
mixed
The decoded JSON response or false if the client is not authenticated.
createLink
Method to post a link on user's feed. Requires authentication and publish_stream permission.
createLink(mixed $user, string $link, string $message = null) : mixed
since |
1.0 |
---|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the username.- $link
string
Link URL.- $message
string
Link message.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $subject
string
The subject of the note.- $message
string
Note content.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $source
string
Path to photo.- $message
string
Photo description.- $place
string
Facebook ID of the place associated with the photo.- $noStory
boolean
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.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $message
string
Post message.- $link
string
Post URL.- $picture
string
Post thumbnail image (can only be used if link is specified)- $name
string
Post name (can only be used if link is specified).- $caption
string
Post caption (can only be used if link is specified).- $description
string
Post description (can only be used if link is specified).- $actions
array
Post actions array of objects containing name and link.- $place
string
Facebook Page ID of the location associated with this Post.- $tags
string
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.- $privacy
string
Post privacy settings (can only be specified if the Timeline being posted on belongs to the User creating the Post).- $objectAttachment
string
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.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $message
string
Status message content.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $source
string
Path to video.- $title
string
Video title.- $description
string
Video description.
Response
mixed
The 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
since |
1.2.0 |
---|
Arguments
- $object
string
The object id.- $connection
string
The object's connection name.- $extraFields
string
URL fields.
Response
mixed
The 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
string
Event ID.
Response
boolean
Returns true if successful, and false otherwise.
deleteLink
Method to delete a link. Requires authentication and publish_stream permission.
deleteLink(mixed $link) : boolean
since |
1.0 |
---|
Arguments
- $link
mixed
The Link ID.
Response
boolean
Returns 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
mixed
Either an integer containing the user ID or a string containing the username.- $permission
string
The permission to revoke. If none specified, then this will de-authorize the application completely.
Response
mixed
The 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
string
The Post ID.
Response
mixed
The 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
string
The Status ID.
Response
mixed
The 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
mixed
Event ID.- $name
string
Event name.- $startTime
string
Event start time as UNIX timestamp.- $endTime
string
Event end time as UNIX timestamp.- $description
string
Event description.- $location
string
Event location.- $locationId
string
Facebook Place ID of the place the Event is taking place.- $privacyType
string
Event privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'.
Response
mixed
The 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
since |
1.2.0 |
---|
Arguments
- $path
string
URL to inflect.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
string
The request URL.
get
Method to get an object.
get(string $object) : mixed
since |
1.2.0 |
---|
Arguments
- $object
string
The object id.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
since |
1.2.0 |
---|
Arguments
- $object
string
The object id.- $connection
string
The object's connection name.- $extraFields
string
URL fields.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $filter
string
User's stream filter.- $location
boolean
Retreive only posts with a location attached.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The decoded JSON response or false if the client is not authenticated.
getLinks
Method to get the user's posted links. Requires authentication and user_groups or friends_groups permission.
getLinks(mixed $user, integer $limit, integer $offset, string $until = null, string $since = null) : mixed
since |
1.0 |
---|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username for the current user.- $user
mixed
Either an integer containing the user ID or a string containing the username for the user.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $read
boolean
Enables you to see notifications that the user has already read.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The decoded JSON response or false if the client is not authenticated.
getOauth
Method used to get the OAuth client.
getOauth() : \Joomla\Facebook\OAuth
getPermissions
Method to get the user's permissions. Requires authentication.
getPermissions(mixed $user, integer $limit, integer $offset) : mixed
since |
1.0 |
---|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $redirect
boolean
If false this will return the URL of the profile picture without a 302 redirect.- $type
string
To request a different photo use square | small | normal | large.
Response
string
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $location
boolean
Retreive only posts with a location attached.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username for the current user.- $user
mixed
Either an integer containing the user ID or a string containing the username for the user.
Response
mixed
The 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
mixed
Either an integer containing the user ID or a string containing the username.- $page
string
Facebook ID of the Page.
Response
mixed
The 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
since |
1.2.0 |
---|---|
throws |
|
Arguments
- $path
string
The path of the request to make.- $data
mixed
Either an associative array or a string to be sent with the post request.- $headers
array
An array of name-value pairs to include in the header of the request- $limit
integer
The number of objects per page.- $offset
integer
The object's number on the page.- $until
string
A unix timestamp or any date accepted by strtotime.- $since
string
A unix timestamp or any date accepted by strtotime.
Response
mixed
The request response.
setOauth
Method used to set the OAuth client.
setOauth(\Joomla\Facebook\OAuth $oauth) : \Joomla\Facebook\AbstractFacebookObject
since |
1.2.0 |
---|
Arguments
- $oauth
\Joomla\Facebook\OAuth
The OAuth client object.
Response
\Joomla\Facebook\AbstractFacebookObject
This 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
string
The notification id.
Response
boolean
Returns true if successful, and false otherwise.
Properties
options
Options for the Facebook object.
since |
1.2.0 |
---|
Type(s)
array
client
The HTTP client object to use in sending HTTP requests.