Class

FB_Feed

Methods

setFacebook

setFacebook()

SET FACEBOOK

Set the facebook sdk instance

Parameters:$facebook – SDK instance
Return type:void

setAccessToken

setAccessToken()

SET ACCESS TOKEN

Set the access token to use

Parameters:$token – token
Return type:void

setFrom

setFrom()

SET FROM

The ID or username of the user posting the message. If this is unspecified, it defaults to the current user. If specified, it must be the ID of the user or of a page that the user administers

Parameters:$user_id
Return type:void

setTo

setTo()

SET TO

The ID or username of the profile that this story will be published to. If this is unspecified, it defaults to the value of from.

Parameters:$user_id
Return type:void

setPicture

setPicture()

SET PICTURE

The URL of a picture attached to this post. The picture must be at least 50px by 50px and have a maximum aspect ratio of 3:1

Parameters:$url
Return type:void

setSource

setSource()

SET SOURCE

The URL of a media file (either SWF or MP3) attached to this post. If both source and picture are specified, only source is used.

Parameters:$url
Return type:void

setName

setName()

SET NAME

The name of the link attachment.

Parameters:$value
Return type:void

setCaption

setCaption()

SET CAPTION

The caption of the link (appears beneath the link name). If not specified, this field is automatically populated with the URL of the link.

Parameters:$value
Return type:void

setDescription

setDescription()

SET DESCRIPTION

The description of the link (appears beneath the link caption). If not specified, this field is automatically populated by information scraped from the link, typically the title of the page.

Parameters:$value
Return type:void

setMessage

setMessage()

SET MESSAGE

The message that appears in the post. Facebook suggests not pre-populating this parameter?

Parameters:$value
Return type:void

setProperties

setProperties()

SET PROPERTIES

A JSON object of key/value pairs which will appear in the stream attachment beneath the description, with each property on its own line. Keys must be strings, and values can be either strings or JSON objects with the keys text and href.

Parameters:$json_obj
Return type:void

setActions

setActions()

SET ACTIONS

A JSON array containing a single object describing the action link which will appear next to the “Comment” and “Like” link under posts. The contained object must have the keys name and link.

Parameters:$json_obj
Return type:void

setRef

setRef()

SET REF

A text reference for the category of feed post. This category is used in Facebook Insights to help you measure the performance of different types of post

Parameters:$json_obj
Return type:void

__construct

__construct()

CONSTRUCTOR

Parameters:$facebook – SDK instance (can be set later before publish is called)
Return type:void

publish

publish()

PUBLISH

Publish a facebook feed and returns an object with success or failure info

Parameters:
  • $profile_id – of the user/page to publish to
  • $type – or page eg - FB_PublishFeed::TYPE_USER
Return type:

object

createAction

createAction()

CREATE ACTION

Returns an associative array for an action link

Parameters:
  • $name – name
  • $link – value
Return type:

array

createProperty

createProperty()

CREATE PROPERTY

Returns an associative array for an property link

Parameters:
  • $name
  • $text – text
  • $href
Return type:

array

_publishData

_publishData()

PUBLISH DATA

Returns an associative array with only valid (non null) params

Return type:array

Constants

TYPE_USER

TYPE_PAGE

Project Versions

Table Of Contents

Previous topic

Class

Next topic

FB_Helper

This Page