Class

FB_Graph_Post

Methods

setCaption

setCaption()

Set caption

Post caption (can only be used if link is specified)

Parameters:string
Return type:void

setDescription

setDescription()

Set description

Post description (can only be used if link is specified)

Parameters:string
Return type:void

setMessage

setMessage()

Set message

The message that appears in the post.

Parameters:string
Return type:void

setName

setName()

Set name

Post name (can only be used if link is specified)

Parameters:string
Return type:void

setPicture

setPicture()

Set picture

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

Parameters:string
Return type:void

setActions

setActions()

Set actions

Array of objects containing ‘name’ and ‘link’ keys

Parameters:array
Return type:void

setTargeting

setTargeting()

Set targeting

JSON object containing countries, cities, regions or locales Example: {‘countries’:[‘US’,’GB’]}

Parameters:string
Return type:void

setPublished

setPublished()

Set published

Whether a post is published. Default is published.

Requires extended permissions: publish_stream, manage_pages Only available when publishing to a page.

Parameters:boolean
Return type:void

setScheduledPublishTime

setScheduledPublishTime()

Set scheduled publish time

Time when the page post should go live, this should be between 10 mins and 6 months from the time of publishing the post.

Requires extended permissions: publish_stream, manage_pages Only available when publishing to a page.

Parameters:string – a unix timestamp
Return type:void

__construct

__construct()

Constructor

Parameters:string – the message
Return type:void

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 a property link

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

array

create

create()

Create a post

Parameters:string|int – the profile ID (eg - me)
Return type:string the new post ID

Constants

CONNECTION