class JFacebookUser extends JFacebookObject

Facebook API User class for the Joomla Platform.

Methods

__construct( Registry $options = null, JHttp $client = null, JFacebookOAuth $oauth = null)

Constructor.

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

Method to send the request.

mixed
get( string $object)

Method to get an object.

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

Method to get object's connection.

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

Method to create a connection.

mixed
deleteConnection( string $object, string $connection = null, string $extra_fields = '')

Method to delete a connection.

setOAuth( JFacebookOAuth $oauth)

Method used to set the OAuth client.

getOAuth()

Method used to get the OAuth client.

mixed
getUser( mixed $user)

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

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

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

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

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

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

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

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

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

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

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

mixed
hasFriend( mixed $current_user, mixed $user)

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

mixed
getMutualFriends( mixed $current_user, mixed $user, integer $limit, integer $offset)

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

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

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

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

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

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

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

boolean
updateNotification( string $notification)

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

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

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

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

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

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

Method to get the user's albums. Requires authentication and userphotos or friendsphotos permission.

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

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

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

Method to get the user's checkins. Requires authentication and usercheckins or friendscheckins permission

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

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

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

Method to get the user's likes. Requires authentication and userlikes or friendslikes permission.

mixed
likesPage( mixed $user, string $page)

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

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

Method to get the current user's events. Requires authentication and userevents or friendsevents permission.

mixed
createEvent( mixed $user, string $name, string $start_time, string $end_time = null, string $description = null, string $location = null, string $location_id = null, string $privacy_type = null)

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

mixed
editEvent( mixed $event, string $name = null, string $start_time = null, string $end_time = null, string $description = null, string $location = null, string $location_id = null, string $privacy_type = null)

Method to edit an event. Requires authentication create_event permission.

boolean
deleteEvent( string $event)

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.

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

Method to get the groups that the user belongs to. Requires authentication and usergroups or friendsgroups permission.

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

Method to get the user's posted links. Requires authentication and usergroups or friendsgroups permission.

mixed
createLink( mixed $user, string $link, string $message = null)

Method to post a link on user's feed. Requires authentication and publish_stream permission.

boolean
deleteLink( mixed $link)

Method to delete a link. Requires authentication and publish_stream permission.

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

Method to get the user's notes. Requires authentication and usergroups or friendsgroups permission.

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

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

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

Method to get the user's photos. Requires authentication and usergroups or friendsgroups permission.

mixed
createPhoto( mixed $user, string $source, string $message = null, string $place = null, boolean $no_story = null)

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

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

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

mixed
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 $object_attachment = null)

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

mixed
deletePost( string $post)

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

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

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

mixed
createStatus( mixed $user, string $message)

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

mixed
deleteStatus( string $status)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Method to get the user's subscribers. Requires authentication and usersubscriptions or friendssubscriptions permission.

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

Method to get the people the user is subscribed to. Requires authentication and usersubscriptions or friendssubscriptions permission.

Details

__construct( Registry $options = null, JHttp $client = null, JFacebookOAuth $oauth = null)

Constructor.

Parameters

Registry $options Facebook options object.
JHttp $client The HTTP client object.
JFacebookOAuth $oauth The OAuth client.

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

Method to send the request.

Parameters

string $path The path of the request to make.
mixed $data Either an associative array or a string to be sent with the post request.
array $headers An array of name-value pairs to include in the header of the request
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

mixed The request response.

Exceptions

DomainException

mixed get( string $object)

Method to get an object.

Parameters

string $object The object id.

Return Value

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

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

Method to get object's connection.

Parameters

string $object The object id.
string $connection The object's connection name.
string $extra_fields URL fields.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

Method to create a connection.

Parameters

string $object The object id.
string $connection The object's connection name.
array $parameters The POST request parameters.
array $headers An array of name-value pairs to include in the header of the request

Return Value

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

mixed deleteConnection( string $object, string $connection = null, string $extra_fields = '')

Method to delete a connection.

Parameters

string $object The object id.
string $connection The object's connection name.
string $extra_fields URL fields.

Return Value

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

JFacebookObject setOAuth( JFacebookOAuth $oauth)

Method used to set the OAuth client.

Parameters

JFacebookOAuth $oauth The OAuth client object.

Return Value

JFacebookObject This object for method chaining.

JFacebookOAuth getOAuth()

Method used to get the OAuth client.

Return Value

JFacebookOAuth The OAuth client

mixed getUser( mixed $user)

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $filter User's stream filter.
boolean $location Retreive only posts with a location attached.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

mixed hasFriend( mixed $current_user, mixed $user)

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

Parameters

mixed $current_user Either an integer containing the user ID or a string containing the username for the current user.
mixed $user Either an integer containing the user ID or a string containing the username for the user.

Return Value

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

mixed getMutualFriends( mixed $current_user, mixed $user, integer $limit, integer $offset)

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

Parameters

mixed $current_user Either an integer containing the user ID or a string containing the username for the current user.
mixed $user Either an integer containing the user ID or a string containing the username for the user.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
boolean $redirect If false this will return the URL of the profile picture without a 302 redirect.
string $type To request a different photo use square | small | normal | large.

Return Value

string The URL to the user's profile picture.

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

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

.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
boolean $read Enables you to see notifications that the user has already read.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

boolean updateNotification( string $notification)

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

Parameters

string $notification The notification id.

Return Value

boolean Returns true if successful, and false otherwise.

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $permission The permission to revoke. If none specified, then this will de-authorize the application completely.

Return Value

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

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

Method to get the user's albums. Requires authentication and userphotos or friendsphotos permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $name Album name.
string $description Album description.
string $privacy A JSON-encoded object that defines the privacy setting for the album.

Return Value

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

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

Method to get the user's checkins. Requires authentication and usercheckins or friendscheckins permission

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $place Id of the Place Page.
string $coordinates A JSON-encoded string containing latitute and longitude.
string $tags Comma separated list of USER_IDs.
string $message A message to add to the checkin.
string $link A link to add to the checkin.
string $picture A picture to add to the checkin.

Return Value

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

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

Method to get the user's likes. Requires authentication and userlikes or friendslikes permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

mixed likesPage( mixed $user, string $page)

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $page Facebook ID of the Page.

Return Value

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

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

Method to get the current user's events. Requires authentication and userevents or friendsevents permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

mixed createEvent( mixed $user, string $name, string $start_time, string $end_time = null, string $description = null, string $location = null, string $location_id = null, string $privacy_type = null)

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $name Event name.
string $start_time Event start time as UNIX timestamp.
string $end_time Event end time as UNIX timestamp.
string $description Event description.
string $location Event location.
string $location_id Facebook Place ID of the place the Event is taking place.
string $privacy_type Event privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'.

Return Value

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

mixed editEvent( mixed $event, string $name = null, string $start_time = null, string $end_time = null, string $description = null, string $location = null, string $location_id = null, string $privacy_type = null)

Method to edit an event. Requires authentication create_event permission.

Parameters

mixed $event Event ID.
string $name Event name.
string $start_time Event start time as UNIX timestamp.
string $end_time Event end time as UNIX timestamp.
string $description Event description.
string $location Event location.
string $location_id Facebook Place ID of the place the Event is taking place.
string $privacy_type Event privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'.

Return Value

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

boolean deleteEvent( string $event)

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.

Parameters

string $event Event ID.

Return Value

boolean Returns true if successful, and false otherwise.

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

Method to get the groups that the user belongs to. Requires authentication and usergroups or friendsgroups permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

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

Method to get the user's posted links. Requires authentication and usergroups or friendsgroups permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

Method to post a link on user's feed. Requires authentication and publish_stream permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $link Link URL.
string $message Link message.

Return Value

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

Method to delete a link. Requires authentication and publish_stream permission.

Parameters

mixed $link The Link ID.

Return Value

boolean Returns true if successful, and false otherwise.

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

Method to get the user's notes. Requires authentication and usergroups or friendsgroups permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Requires authentication and publishstream permission, usergroups or friends_groups permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $subject The subject of the note.
string $message Note content.

Return Value

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

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

Method to get the user's photos. Requires authentication and usergroups or friendsgroups permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

mixed createPhoto( mixed $user, string $source, string $message = null, string $place = null, boolean $no_story = null)

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $source Path to photo.
string $message Photo description.
string $place Facebook ID of the place associated with the photo.
boolean $no_story 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 Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
boolean $location Retreive only posts with a location attached.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

mixed 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 $object_attachment = null)

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $message Post message.
string $link Post URL.
string $picture Post thumbnail image (can only be used if link is specified)
string $name Post name (can only be used if link is specified).
string $caption Post caption (can only be used if link is specified).
string $description Post description (can only be used if link is specified).
array $actions Post actions array of objects containing name and link.
string $place Facebook Page ID of the location associated with this Post.
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.
string $privacy Post privacy settings (can only be specified if the Timeline being posted on belongs to the User creating the Post).
string $object_attachment 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 Value

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

mixed deletePost( string $post)

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

Parameters

string $post The Post ID.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

mixed createStatus( mixed $user, string $message)

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $message Status message content.

Return Value

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

mixed deleteStatus( string $status)

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.

Parameters

string $status The Status ID.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
string $source Path to video.
string $title Video title.
string $description Video description.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

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

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.
string $until A unix timestamp or any date accepted by strtotime.
string $since A unix timestamp or any date accepted by strtotime.

Return Value

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

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

Method to get the user's subscribers. Requires authentication and usersubscriptions or friendssubscriptions permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

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

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

Method to get the people the user is subscribed to. Requires authentication and usersubscriptions or friendssubscriptions permission.

Parameters

mixed $user Either an integer containing the user ID or a string containing the username.
integer $limit The number of objects per page.
integer $offset The object's number on the page.

Return Value

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