API > eden > facebook > graph.php
View Source

class Eden_Facebook_Graph

Facebook Authentication

Constants

  • GRAPH_URL: https://graph.facebook.com/
  • LOGOUT_URL: https://www.facebook.com/logout.php?next

Public Methods

public function addAlbum($id, $name, $message)

Add an album

Arguments

  1. string|int the object ID to place the album
  2. string
  3. string the album description

Returns int the album ID

public function addComment($id, $message)

Adds a comment to a post

Arguments

  1. int the post ID commenting on
  2. string

Returns int the comment ID

public function attendEvent($id)

Attend an event

Arguments

  1. int the event ID

Returns this

public function checkin($id, $message, $latitude, $longitude, $place, $tags)

Check into a place

Arguments

  1. string|int the checkin ID
  2. string
  3. float
  4. float
  5. int the place ID
  6. string|array

Returns int

public function createNote($id = 'me', $subject, $message)

Add a note

Arguments

  1. int|string object ID where to put the note
  2. string
  3. string

Returns int

public function declineEvent($id)

Decline an event

Arguments

  1. int event ID

Returns this

public function event($name, $start, $end)

Add an event

Arguments

  1. string name of event
  2. string|int string date or time format
  3. string|int string date or time format

Returns Eden_Facebook_Event

public function getFields($id = 'me', $fields)

Returns specific fields of an object

Arguments

  1. string|int
  2. string|array

Returns array

public function getLogoutUrl($redirect)

Returns the logout URL

Arguments

  1. string

Returns string

public function getObject($id = 'me', $connection = NULL, array $query = array(), $auth = true)

Returns the detail of any object

Arguments

  1. string|int
  2. string|null
  3. array
  4. bool

Returns array

public function getPermissions($id = 'me')

Returns user permissions

Arguments

  1. string|int

Returns array

public function getPictureUrl($id = 'me', $token = true)

Returns the user's image

Arguments

  1. string|int
  2. bool

Returns string

public function getUser()

Returns the user info

Returns array

public function like($id)

Like an object

Arguments

  1. int|string object ID

Returns array

public function link($url)

Add a link

Arguments

  1. string

Returns Eden_Facebook_Link

public function maybeEvent($id)

Maybe an event

Arguments

  1. int event ID

Returns this

public function post($message)

Returns Facebook Post

Arguments

  1. string

Returns Eden_Facebook_Post

public function uploadPhoto($albumId, $file, $message = NULL)

Uploads a file of your album

Arguments

  1. int|string
  2. string
  3. string|null

Returns int photo ID


© 2012 Openovate Labs. All rights reserved.