\Horde_Service_Facebook_Streams

Open streams API

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

Summary

Methods
Properties
Constants
__construct()
getPost()
getWall()
getStream()
getFilters()
post()
delete()
addComment()
removeComment()
addLike()
removeLike()
No public properties found
No constants found
No protected methods found
$_facebook
$_http
N/A
No private methods found
No private properties found
N/A

Properties

$_http

$_http : \Horde_Http_Client

Type

\Horde_Http_Client

Methods

__construct()

__construct(\Horde_Service_Facebook  $facebook) 

Constructor

Parameters

\Horde_Service_Facebook $facebook

getPost()

getPost(  $uid) : object

Get a specific post.

Parameters

$uid

Returns

object —

The post object.

getWall()

getWall(string  $uid = '') : mixed

Get a user's wall stream

Parameters

string $uid

The user id.

Returns

mixed —

Method call results.

getStream()

getStream(string  $filter = null, array  $options = array()) : object

Return the logged in user's news stream.

Parameters

string $filter

A named stream filter to apply.

array $options

Additional options:

  • limit: (integer) The maximum number of posts to return.
  • offset: (integer) The post to start returning from.
  • until: (timestamp) Do not return posts after this timestamp.
  • since: (timestamp) Do not return posts before this timestamp.

Returns

object

getFilters()

getFilters(integer  $uid) : array

Get a user's stream filter.

Parameters

integer $uid

The user id of whose filters we are requesting.

Returns

array —

of filter data.

post()

post(string  $uid, string  $message, array  $options = array()) : string

Post a message to a user's stream.

Parameters

string $uid

The user id of the user whose stream we are posting the message to.

string $message

The message body to post.

array $options

Additional post options:

  • link: (string) A link to attach to this post.
  • picture (string) A URL to a thumbnail image to use for this post if link is set.
  • name: (string) A name for the post if link is set.
  • caption: (string) The caption, if link is set.
  • description: (string) A description, if link is specified.
  • actions: (array) An array of actions containing name and link (?).
  • place: (string) Facebook page id of the location associated with post.
  • tags: (string) Comma delimted list of Facebook ids of people tagged in this post. Requires place tags to be passed also.
  • privacy: (string) Privacy settings (if posting to the current user's stream only). This is a JSON encoded object that defines the privacy settings. See https://developers.facebook.com/docs/reference/api/user/#posts -object_attachment: (string) The Facebook id for an existing picture in the user's photo albums to use as the thumbnail image. User must be the owner of the photo.

Returns

string —

The UID of the new post.

delete()

delete(  $postid) : boolean

Remove a post from a user's stream

Parameters

$postid

Returns

boolean

addComment()

addComment(string  $postId, string  $comment) : string

Add a comment to a user's post.

Parameters

string $postId

The post id the comment belongs to

string $comment

The body of the comment (text only, no HTML).

Returns

string —

The comment id of the posted comment.

removeComment()

removeComment(string  $commentId) : boolean

Remove a comment from a post.

Parameters

string $commentId

The comment id to remove.

Returns

boolean

addLike()

addLike(string  $postId) : boolean

Add a "like" to a post.

Parameters

string $postId

Returns

boolean

removeLike()

removeLike(string  $postId) : boolean

Remove a "like" from a stream post.

Parameters

string $postId

The post id to remove a like from.

Returns

boolean