Class FacebookRestClient

Description
Class Constant Summary
Variable Summary
mixed $added
mixed $api_key
mixed $batch_mode
mixed $canvas_user
mixed $is_user
mixed $secret
mixed $session_key
mixed $user
Method Summary
static void convert_simplexml_to_array ( $sxml)
FacebookRestClient __construct ( $api_key,  $secret, [string $session_key = null])
bool admin_banUsers (array $uids)
int &admin_getAllocation (string $integration_point_name, [int $uid = null])
array admin_getAppProperties (properties $properties)
bool admin_getBannedUsers ([array $uids = null])
array &admin_getMetrics (start_time $start_time, end_time $end_time, period $period, metrics $metrics)
bool admin_setAppProperties (properties $properties)
bool admin_setRestrictionInfo ([array $restriction_info = null])
bool admin_unbanUsers (array $uids)
array application_getPublicInfo ([int $application_id = null], [string $application_api_key = null], [string $application_canvas_name = null])
string auth_createToken ()
string auth_getAppPublicKey (string $target_app_key)
array auth_getSession (string $auth_token, [bool $generate_session_secret = false])
bool auth_revokeAuthorization ([int $uid = null])
void auth_revokeExtendedPermission (string $perm, [int $uid = null])
void begin_batch ()
void begin_permissions_mode ( $permissions_apikey)
mixed &call_method (string $method, [array $params = array()])
array call_upload_method (string $method, array $params, string $file, [ $server_addr = null])
string &comments_add (string $xid, string $text, [int $uid = 0], [string $title = ''], [string $url = ''], [bool $publish_to_stream = false])
array &comments_get (string $xid)
boolean &comments_remove (string $xid, string $comment_id)
array connect_registerUsers (mixed $accounts)
array connect_unregisterUsers (array $email_hashes)
void convert_result ( $data,  $method,  $params)
void convert_xml_to_result ( $xml,  $method,  $params)
void curl_exec (resource $ch)
newly &data_createObject (obj_type $obj_type, [properties $properties = null])
void &data_createObjectType (name $name)
void &data_defineAssociation (name $name, assoc_type $assoc_type, assoc_info1 $assoc_info1, assoc_info2 $assoc_info2, [inverse $inverse = null])
void &data_defineObjectProperty (obj_type $obj_type, prop_name $prop_name, prop_type $prop_type)
void &data_deleteObject (obj_id $obj_id)
void &data_deleteObjects (obj_ids $obj_ids)
void &data_dropObjectType (obj_type $obj_type)
associated &data_getAssociatedObjectCount (name $name, obj_id $obj_id)
associated &data_getAssociatedObjectCounts (name $name, obj_ids $obj_ids)
associated &data_getAssociatedObjects (name $name, obj_id $obj_id, [no_data $no_data = true])
specified &data_getAssociationDefinition (name $name)
all &data_getAssociations (obj_id1 $obj_id1, obj_id2 $obj_id2, [no_data $no_data = true])
array data_getCookies (int $uid, string $name)
hash &data_getHashValue (obj_type $obj_type, key $key, [prop_name $prop_name = null])
specified &data_getObject (obj_id $obj_id, [prop_names $prop_names = null])
individual &data_getObjectProperty (obj_id $obj_id, prop_name $prop_name)
specified &data_getObjects (obj_ids $obj_ids, [prop_names $prop_names = null])
pairs &data_getObjectType (obj_type $obj_type)
preference's &data_getUserPreference (pref_id $pref_id, [uid $uid = null])
preference &data_getUserPreferences ([uid $uid = null])
incremented &data_incHashValue (obj_type $obj_type, key $key, prop_name $prop_name, [increment $increment = 1])
void &data_removeAssociatedObjects (name $name, obj_id $obj_id)
void &data_removeAssociation (name $name, obj_id1 $obj_id1, obj_id2 $obj_id2)
void &data_removeAssociations (assocs $assocs, [name $name = null])
void &data_removeHashKey (obj_type $obj_type, key $key)
void &data_removeHashKeys (obj_type $obj_type, keys $keys)
void &data_renameAssociation (name $name, new_name $new_name, [new_alias1 $new_alias1 = null], [new_alias2 $new_alias2 = null])
void &data_renameObjectProperty (obj_type $obj_type, prop_name $prop_name, new_name $new_name)
void &data_renameObjectType (obj_type $obj_type, new_name $new_name)
void &data_setAssociation (name $name, obj_id1 $obj_id1, obj_id2 $obj_id2, [data $data = null], [assoc_time $assoc_time = null])
void &data_setAssociations (assocs $assocs, [name $name = null])
bool data_setCookie (int $uid, string $name, string $value, int $expires, string $path)
void &data_setHashValue (obj_type $obj_type, key $key, value $value, [prop_name $prop_name = null])
void &data_setObjectProperty (obj_id $obj_id, prop_name $prop_name, prop_value $prop_value)
void &data_setUserPreference (pref_id $pref_id, value $value, [uid $uid = null])
void &data_setUserPreferences (values $values, [replace $replace = false], [uid $uid = null])
void &data_undefineAssociation (name $name)
void &data_undefineObjectProperty (obj_type $obj_type, prop_name $prop_name)
void &data_updateObject (obj_id $obj_id, properties $properties, [replace $replace = false])
void end_batch ()
bool &events_cancel (int $eid, [string $cancel_message = ''])
int events_create (assoc $event_info, [string $file = null])
bool events_edit (int $eid, assoc $event_info, [string $file = null])
array &events_get ([int $uid = null], [array/string $eids = null], [int $start_time = null], [int $end_time = null], [string $rsvp_status = null])
array &events_getMembers (int $eid)
bool &events_rsvp (int $eid, string $rsvp_status)
bool &fbml_deleteCustomTags ([array $tag_names = null])
mixed &fbml_getCustomTags ([int $app_id = null])
bool &fbml_refreshImgSrc (string $url)
bool &fbml_refreshRefUrl (string $url)
int &fbml_registerCustomTags (mixed $tags)
bool &fbml_setRefHandle (string $handle, string $fbml)
int &fbml_uploadNativeStrings (array $native_strings)
bool &feed_deactivateTemplateBundleByID (string $template_bundle_id)
array &feed_getRegisteredTemplateBundleByID (string $template_bundle_id)
void &feed_publishTemplatizedAction ( $title_template,  $title_data,  $body_template,  $body_data,  $body_general, [ $image_1 = null], [ $image_1_link = null], [ $image_2 = null], [ $image_2_link = null], [ $image_3 = null], [ $image_3_link = null], [ $image_4 = null], [ $image_4_link = null], [ $target_ids = ''], [ $page_actor_id = null])
bool &feed_publishUserAction (int $template_bundle_id, array $template_data, [array $target_ids = ''], [string $body_general = ''], [int $story_size = FacebookRestClient::STORY_SIZE_ONE_LINE], [string $user_message = ''])
string &feed_registerTemplateBundle ( $one_line_story_templates, [ $short_story_templates = array()], [ $full_story_template = null], [ $action_links = array()])
void finalize_params ( $method,  $params)
array &fql_multiquery (string $queries)
array &fql_query (string $query)
array &friends_areFriends (array/string $uids1, array/string $uids2)
array &friends_get ([int $flid = null], [int $uid = null])
array &friends_getMutualFriends (int $target_uid, [int $source_uid = null])
string getFormat ()
void get_uid ( $uid)
array &groups_get (int $uid, array/string $gids)
array &groups_getMembers (int $gid)
array &links_get (int $uid, int $limit, [array $link_ids = null])
bool &links_post (string $url, [string $comment = ''], [int $uid = null])
int marketplace_createListing (int $listing_id, show_on_profile $show_on_profile, listing_attrs $attrs, [ $uid = null])
array marketplace_getListings (listing_ids $listing_ids, uids $uids)
array marketplace_getSubCategories (category $category)
bool marketplace_removeListing (listing_id $listing_id, [status $status = 'DEFAULT'], [ $uid = null])
array marketplace_search (category $category, subcategory $subcategory, query $query)
int &notes_create (string $title, string $content, [int $uid = null])
bool &notes_delete (int $note_id, [int $uid = null])
bool &notes_edit (int $note_id, string $title, string $content, [int $uid = null])
array &notes_get (int $uid, [array $note_ids = null])
A &notifications_send ( $to_ids,  $notification,  $type)
string &notifications_sendEmail (array/string $recipients, string $subject, string $text, string $fbml)
array &pages_getInfo (array/string $page_ids, array/string $fields, int $uid, string $type)
bool &pages_isAdmin (int $page_id, [int $uid = null])
bool &pages_isAppAdded (int $page_id)
bool &pages_isFan (int $page_id, [int $uid = null])
void payments_getOrderDetails ( $order_id)
void payments_getOrders ( $status,  $start_time,  $end_time, [ $test_mode = false])
true payments_setProperties (properties $properties)
void payments_updateOrder ( $order_id,  $status,  $params)
void pending_batch ()
array permissions_checkAvailableApiAccess (string $permissions_apikey)
array permissions_checkGrantedApiAccess (string $permissions_apikey)
array permissions_grantApiAccess (string $permissions_apikey, array(string) $method_arr)
bool permissions_revokeApiAccess (string $permissions_apikey)
bool &photos_addTag (int $pid, int $tag_uid, string $tag_text, float $x, float $y, array $tags, [int $owner_uid = 0])
array &photos_createAlbum (string $name, [string $description = ''], [string $location = ''], [string $visible = ''], [int $uid = 0])
array &photos_get (int $subj_id, int $aid, array/string $pids)
an &photos_getAlbums (int $uid, string $aids)
array &photos_getTags (string $pids)
array photos_upload (string $file, [int $aid = null], [string $caption = null], [int $uid = null])
void post_request ( $method,  $params)
string &profile_getFBML ([int $uid = null], [int $type = null])
array &profile_getInfo ([int $uid = null])
array &profile_getInfoOptions (string $field)
array profile_setFBML (string $markup, [int $uid = null], [string $profile = ''], [string $profile_action = ''], [string $mobile_profile = ''], [string $profile_main = ''])
bool &profile_setInfo (string $title, int $type, array $info_fields, [int $uid = null])
bool profile_setInfoOptions (string $field, array $options)
void setFormat (string $format)
void set_user ($uid $uid)
void set_use_curl_if_available ($use_curl_if_available $use_curl_if_available)
void set_use_ssl_resources ([ $is_ssl = true])
string stream_addComment ($post_id $post_id, $comment $comment, [$uid $uid = null])
bool stream_addLike ($post_id $post_id, [$uid $uid = null])
array( &stream_get ([int $viewer_id = null], [array $source_ids = null], [int $start_time = 0], [int $end_time = 0], [int $limit = 30], [string $filter_key = ''], array $metadata)
array &stream_getComments (string $post_id)
array &stream_getFilters ([int $uid = null])
string stream_publish ($message $message, [$attachment $attachment = null], [$action $action_links = null], [$target_id $target_id = null], [$uid $uid = null])
bool stream_remove ($post_id $post_id, [$uid $uid = null])
bool stream_removeComment ($comment_id $comment_id, [$uid $uid = null])
bool stream_removeLike ($post_id $post_id, [$uid $uid = null])
array &users_getInfo (array/string $uids, array/string $fields)
array &users_getStandardInfo (array/string $uids, array/string $fields)
integer &users_hasAppPermission ( $ext_perm, [ $uid = null])
boolean &users_isAppUser ([ $uid = null])
boolean &users_isVerified ()
boolean &users_setStatus (string $status, [int $uid = null], [bool $clear = false], [bool $status_includes_verb = true])
array video_upload (string $file, [string $title = null], [string $description = null])
Variables
mixed $added (line 75)
  • access: public
mixed $api_key (line 68)
  • access: public
mixed $batch_mode (line 81)
  • access: public
mixed $canvas_user (line 80)
  • access: public
mixed $friends_list (line 71)
  • access: public
mixed $is_user (line 76)
  • access: public
mixed $secret (line 66)
  • access: public
mixed $session_key (line 67)
  • access: public
mixed $user (line 72)
  • access: public
Methods
static method convert_simplexml_to_array (line 3322)
  • access: public
static void convert_simplexml_to_array ( $sxml)
  • $sxml
Constructor __construct (line 99)

Create the client.

  • access: public
FacebookRestClient __construct ( $api_key,  $secret, [string $session_key = null])
  • string $session_key: if you haven't gotten a session key yet, leave this as null and then set it later by just directly accessing the $session_key member variable.
  • $api_key
  • $secret
admin_banUsers (line 2988)

Bans a list of users from the app. Banned users can't access the app's canvas page and forums.

  • return: true on success
  • access: public
bool admin_banUsers (array $uids)
  • array $uids: an array of user ids
admin_getAllocation (line 2917)

Returns the allocation limit value for a specified integration point name Integration point names are defined in lib/api/karma/constants.php in the limit_map.

  • return: Integration point allocation value
  • access: public
int &admin_getAllocation (string $integration_point_name, [int $uid = null])
  • string $integration_point_name: Name of an integration point (see developer wiki for list).
  • int $uid: Specific user to check the limit.
admin_getAppProperties (line 2888)

Get the properties that you have set for an app.

  • return: A map from property name to value
  • access: public
array admin_getAppProperties (properties $properties)
  • properties $properties: List of properties names to fetch
admin_getBannedUsers (line 3015)

Gets the list of users that have been banned from the application.

$uids is an optional parameter that filters the result with the list of provided user ids. If $uids is provided, only banned user ids that are contained in $uids are returned.

  • return: true on success
  • access: public
bool admin_getBannedUsers ([array $uids = null])
  • array $uids: an array of user ids to filter by
admin_getMetrics (line 2935)

Returns values for the specified metrics for the current application, in the given time range. The metrics are collected for fixed-length periods, and the times represent midnight at the end of each period.

  • return: A map of the names and values for those metrics
  • access: public
array &admin_getMetrics (start_time $start_time, end_time $end_time, period $period, metrics $metrics)
  • start_time $start_time: unix time for the start of the range
  • end_time $end_time: unix time for the end of the range
  • period $period: number of seconds in the desired period
  • metrics $metrics: list of metrics to look up
admin_getRestrictionInfo (line 2974)

Gets application restriction info.

Applications can restrict themselves to only a limited user demographic based on users' age and/or location or based on static predefined types specified by facebook for specifying diff age restriction for diff locations.

  • return: The age restriction settings for this application.
  • access: public
array admin_getRestrictionInfo ()
admin_setAppProperties (line 2901)

Set properties for an app.

  • return: true on success
  • access: public
bool admin_setAppProperties (properties $properties)
  • properties $properties: A map from property names to values
admin_setRestrictionInfo (line 2955)

Sets application restriction info.

Applications can restrict themselves to only a limited user demographic based on users' age and/or location or based on static predefined types specified by facebook for specifying diff age restriction for diff locations.

  • return: true on success
  • access: public
bool admin_setRestrictionInfo ([array $restriction_info = null])
  • array $restriction_info: The age restriction settings to set.
admin_unbanUsers (line 3000)

Unban users that have been previously banned with admin_banUsers().

  • return: true on success
  • access: public
bool admin_unbanUsers (array $uids)
  • array $uids: an array of user ids
application_getPublicInfo (line 278)

Returns public information for an application (as shown in the application directory) by either application ID, API key, or canvas page name.

  • return: An array of public information about the application.
  • access: public
array application_getPublicInfo ([int $application_id = null], [string $application_api_key = null], [string $application_canvas_name = null])
  • int $application_id: (Optional) app id
  • string $application_api_key: (Optional) api key
  • string $application_canvas_name:

    (Optional) canvas name

    Exactly one argument must be specified, otherwise it is an error.

auth_createToken (line 294)

Creates an authentication token to be used as part of the desktop login flow. For more information, please see http://wiki.developers.facebook.com/index.php/Auth.createToken.

  • return: An authentication token.
  • access: public
string auth_createToken ()
auth_expireSession (line 344)

Expires the session that is currently being used. If this call is successful, no further calls to the API (which require a session) can be made until a valid session is created.

  • return: true if session expiration was successful, false otherwise
  • access: public
bool auth_expireSession ()
auth_getAppPublicKey (line 385)

Get public key that is needed to verify digital signature an app may pass to other apps. The public key is only used by other apps for verification purposes.

  • return: The public key for the app.
  • access: public
string auth_getAppPublicKey (string $target_app_key)
  • string $target_app_key: API key of an app
auth_getSession (line 309)

Returns the session information available after current user logs in.

  • return: An assoc array containing session_key, uid
  • access: public
array auth_getSession (string $auth_token, [bool $generate_session_secret = false])
  • string $auth_token: the token returned by auth_createToken or passed back to your callback_url.
  • bool $generate_session_secret: whether the session returned should include a session secret
auth_getSignedPublicSessionData (line 397)

Get a structure that can be passed to another app as proof of session. The other app can verify it using public key of this app.

  • return: public session data structure.
  • access: public
signed auth_getSignedPublicSessionData ()
auth_promoteSession (line 333)

Generates a session-specific secret. This is for integration with client-side API calls, such as the JS library.

  • return: A session secret for the current promoted session
  • access: public
array auth_promoteSession ()
auth_revokeAuthorization (line 373)

Revokes the user's agreement to the Facebook Terms of Service for your

application. If you call this method for one of your users, you will no longer be able to make API requests on their behalf until they again authorize your application. Use with care. Note that if this method is called without a user parameter, then it will revoke access for the current session's user.

  • return: true if revocation succeeds, false otherwise
  • access: public
bool auth_revokeAuthorization ([int $uid = null])
  • int $uid: (Optional) User to revoke
auth_revokeExtendedPermission (line 356)

Revokes the given extended permission that the user granted at some prior time (for instance, offline_access or email). If no user is provided, it will be revoked for the user of the current session.

  • access: public
void auth_revokeExtendedPermission (string $perm, [int $uid = null])
  • string $perm: The permission to revoke
  • int $uid: The user for whom to revoke the permission.
begin_batch (line 173)

Start a batch operation.

  • access: public
void begin_batch ()
begin_permissions_mode (line 246)
  • access: public
void begin_permissions_mode ( $permissions_apikey)
  • $permissions_apikey
call_method (line 3034)

Calls the specified normal POST method with the specified parameters.

  • return: Result of method call; this returns a reference to support 'delayed returns' when in a batch context. See: http://wiki.developers.facebook.com/index.php/Using_batching_API
  • access: public
mixed &call_method (string $method, [array $params = array()])
  • string $method: Name of the Facebook method to invoke
  • array $params: A map of param names => param values
call_upload_method (line 3093)

Calls the specified file-upload POST method with the specified parameters

  • return: A dictionary representing the response.
  • access: public
array call_upload_method (string $method, array $params, string $file, [ $server_addr = null])
  • string $method: Name of the Facebook method to invoke
  • array $params: A map of param names => param values
  • string $file: A path to the file to upload (required)
  • $server_addr
comments_add (line 1769)

Add a comment to a particular xid on behalf of a user. If called without an app_secret (with session secret), this will only work for the session user.

  • return: comment_id associated with the comment
  • access: public
string &comments_add (string $xid, string $text, [int $uid = 0], [string $title = ''], [string $url = ''], [bool $publish_to_stream = false])
  • string $xid: external id associated with the comments
  • string $text: text of the comment
  • int $uid: user adding the comment (def: session user)
  • string $title: optional title for the stream story
  • string $url: optional url for the stream story
  • bool $publish_to_stream: publish a feed story about this comment? a link will be generated to title/url in the story
comments_get (line 1749)

Gets the comments for a particular xid. This is essentially a wrapper around the comment FQL table.

  • return: of comment objects
  • access: public
array &comments_get (string $xid)
  • string $xid: external id associated with the comments
comments_remove (line 1791)

Remove a particular comment.

  • access: public
boolean &comments_remove (string $xid, string $comment_id)
  • string $xid: the external id associated with the comments
  • string $comment_id: id of the comment to remove (returned by comments.add and comments.get)
connect_getUnconnectedFriendsCount (line 407)

Returns the number of unconnected friends that exist in this application.

This number is determined based on the accounts registered through connect.registerUsers() (see below).

  • access: public
void connect_getUnconnectedFriendsCount ()
connect_registerUsers (line 439)

This method is used to create an association between an external user account and a Facebook user account, as per Facebook Connect.

This method takes an array of account data, including a required email_hash and optional account data. For each connected account, if the user exists, the information is added to the set of the user's connected accounts. If the user has already authorized the site, the connected account is added in the confirmed state. If the user has not yet authorized the site, the connected account is added in the pending state.

This is designed to help Facebook Connect recognize when two Facebook friends are both members of a external site, but perhaps are not aware of it. The Connect dialog (see fb:connect-form) is used when friends can be identified through these email hashes. See the following url for details:

http://wiki.developers.facebook.com/index.php/Connect.registerUsers

  • return: The list of email hashes for the successfully registered accounts.
  • access: public
array connect_registerUsers (mixed $accounts)
  • mixed $accounts: A (JSON-encoded) array of arrays, where each array has three properties: 'email_hash' (req) - public email hash of account 'account_id' (opt) - remote account id; 'account_url' (opt) - url to remote account;
connect_unregisterUsers (line 453)

Unregisters a set of accounts registered using connect.registerUsers.

  • return: The list of email hashes which have been successfully unregistered.
  • access: public
array connect_unregisterUsers (array $email_hashes)
  • array $email_hashes: The (JSON-encoded) list of email hashes to be unregistered.
convert_result (line 3058)
  • access: protected
void convert_result ( $data,  $method,  $params)
  • $data
  • $method
  • $params
convert_xml_to_result (line 3126)
  • access: protected
void convert_xml_to_result ( $xml,  $method,  $params)
  • $xml
  • $method
  • $params
curl_exec (line 3267)

execute a curl transaction -- this exists mostly so subclasses can add extra options and/or process the response, if they wish.

  • access: protected
void curl_exec (resource $ch)
  • resource $ch: a curl handle
data_createObject (line 2323)

Create a new object.

  • return: created object's id
  • access: public
newly &data_createObject (obj_type $obj_type, [properties $properties = null])
  • obj_type $obj_type: object type's name
  • properties $properties: (optional) properties to set initially
data_createObjectType (line 2165)

Create a new object type.

  • access: public
void &data_createObjectType (name $name)
  • name $name: object type's name
data_defineAssociation (line 2603)

Define an object association.

  • access: public
void &data_defineAssociation (name $name, assoc_type $assoc_type, assoc_info1 $assoc_info1, assoc_info2 $assoc_info2, [inverse $inverse = null])
  • name $name: name of this association
  • assoc_type $assoc_type: 1: one-way 2: two-way symmetric 3: two-way asymmetric
  • assoc_info1 $assoc_info1: needed info about first object type
  • assoc_info2 $assoc_info2: needed info about second object type
  • inverse $inverse: (optional) name of reverse association
data_defineObjectProperty (line 2224)

Add a new property to an object type.

  • access: public
void &data_defineObjectProperty (obj_type $obj_type, prop_name $prop_name, prop_type $prop_type)
  • obj_type $obj_type: object type's name
  • prop_name $prop_name: name of the property to add
  • prop_type $prop_type: 1: integer; 2: string; 3: text blob
data_deleteObject (line 2365)

Delete an existing object.

  • access: public
void &data_deleteObject (obj_id $obj_id)
  • obj_id $obj_id: object's id
data_deleteObjects (line 2382)

Delete a list of objects.

  • access: public
void &data_deleteObjects (obj_ids $obj_ids)
  • obj_ids $obj_ids: objects to delete
data_dropObjectType (line 2183)

Delete an object type.

  • access: public
void &data_dropObjectType (obj_type $obj_type)
  • obj_type $obj_type: object type's name
data_getAssociatedObjectCount (line 2833)

Count associated objects.

  • return: object's count
  • access: public
associated &data_getAssociatedObjectCount (name $name, obj_id $obj_id)
  • name $name: name of association
  • obj_id $obj_id: who's association to retrieve
data_getAssociatedObjectCounts (line 2854)

Get a list of associated object counts.

  • return: object counts
  • access: public
associated &data_getAssociatedObjectCounts (name $name, obj_ids $obj_ids)
  • name $name: name of association
  • obj_ids $obj_ids: whose association to retrieve
data_getAssociatedObjects (line 2811)

Retrieve a list of associated objects.

  • return: objects
  • access: public
associated &data_getAssociatedObjects (name $name, obj_id $obj_id, [no_data $no_data = true])
  • name $name: name of association
  • obj_id $obj_id: who's association to retrieve
  • no_data $no_data: only return object ids
data_getAssociationDefinition (line 2670)

Get definition of an object association.

  • return: association
  • access: public
specified &data_getAssociationDefinition (name $name)
  • name $name: name of this association
data_getAssociationDefinitions (line 2685)

Get definition of all associations.

  • return: defined associations
  • access: public
all &data_getAssociationDefinitions ()
data_getAssociations (line 2874)

Find all associations between two objects.

  • return: associations between objects
  • access: public
all &data_getAssociations (obj_id1 $obj_id1, obj_id2 $obj_id2, [no_data $no_data = true])
  • obj_id1 $obj_id1: id of first object
  • obj_id2 $obj_id2: id of second object
  • no_data $no_data: only return association names without data
data_getCookies (line 1125)

Returns cookies according to the filters specified.

  • return: Cookies! Nom nom nom nom nom.
  • access: public
array data_getCookies (int $uid, string $name)
  • int $uid: User for which the cookies are needed.
  • string $name: (Optional) A null parameter will get all cookies for the user.
data_getHashValue (line 2488)

Read hash value by key.

  • return: value
  • access: public
hash &data_getHashValue (obj_type $obj_type, key $key, [prop_name $prop_name = null])
  • obj_type $obj_type: object type's name
  • key $key: hash key
  • prop_name $prop_name: (optional) individual property's name
data_getObject (line 2423)

Get properties of an object.

  • return: properties of an object
  • access: public
specified &data_getObject (obj_id $obj_id, [prop_names $prop_names = null])
  • obj_id $obj_id: object's id
  • prop_names $prop_names: (optional) properties to return; null for all.
data_getObjectProperty (line 2402)

Get a single property value of an object.

  • return: property's value
  • access: public
individual &data_getObjectProperty (obj_id $obj_id, prop_name $prop_name)
  • obj_id $obj_id: object's id
  • prop_name $prop_name: individual property's name
data_getObjects (line 2444)

Get properties of a list of objects.

  • return: properties of an object
  • access: public
specified &data_getObjects (obj_ids $obj_ids, [prop_names $prop_names = null])
  • obj_ids $obj_ids: object ids
  • prop_names $prop_names: (optional) properties to return; null for all.
data_getObjectType (line 2304)

Get definitions of all properties of an object type.

  • return: of property name and property types
  • access: public
pairs &data_getObjectType (obj_type $obj_type)
  • obj_type $obj_type: object type's name
data_getObjectTypes (line 2287)

Retrieve a list of all object types that have defined for the application.

  • return: list of object type names
  • access: public
a &data_getObjectTypes ()
data_getUserPreference (line 2130)

Get a user preference.

  • return: value
  • access: public
preference's &data_getUserPreference (pref_id $pref_id, [uid $uid = null])
  • pref_id $pref_id: preference identifier (0-200)
  • uid $uid: the user id (defaults to current session user)
data_getUserPreferences (line 2147)

Get a user preference.

  • return: values
  • access: public
preference &data_getUserPreferences ([uid $uid = null])
  • uid $uid: the user id (defaults to current session user)
data_incHashValue (line 2537)

Increase a hash value by specified increment atomically.

  • return: hash value
  • access: public
incremented &data_incHashValue (obj_type $obj_type, key $key, prop_name $prop_name, [increment $increment = 1])
  • obj_type $obj_type: object type's name
  • key $key: hash key
  • prop_name $prop_name: individual property's name
  • increment $increment: (optional) default is 1
data_removeAssociatedObjects (line 2789)

Remove associations between objects by specifying one object id.

  • access: public
void &data_removeAssociatedObjects (name $name, obj_id $obj_id)
  • name $name: name of association
  • obj_id $obj_id: who's association to remove
data_removeAssociation (line 2749)

Remove an association between two objects.

  • access: public
void &data_removeAssociation (name $name, obj_id1 $obj_id1, obj_id2 $obj_id2)
  • name $name: name of association
  • obj_id1 $obj_id1: id of first object
  • obj_id2 $obj_id2: id of second object
data_removeAssociations (line 2769)

Remove associations between objects by specifying pairs of object ids.

  • access: public
void &data_removeAssociations (assocs $assocs, [name $name = null])
  • assocs $assocs: associations to remove
  • name $name: (optional) name of association
data_removeHashKey (line 2561)

Remove a hash key and its values.

  • access: public
void &data_removeHashKey (obj_type $obj_type, key $key)
  • obj_type $obj_type: object type's name
  • key $key: hash key
data_removeHashKeys (line 2580)

Remove hash keys and their values.

  • access: public
void &data_removeHashKeys (obj_type $obj_type, keys $keys)
  • obj_type $obj_type: object type's name
  • keys $keys: hash keys
data_renameAssociation (line 2648)

Rename an object association or aliases.

  • access: public
void &data_renameAssociation (name $name, new_name $new_name, [new_alias1 $new_alias1 = null], [new_alias2 $new_alias2 = null])
  • name $name: name of this association
  • new_name $new_name: (optional) new name of this association
  • new_alias1 $new_alias1: (optional) new alias for object type 1
  • new_alias2 $new_alias2: (optional) new alias for object type 2
data_renameObjectProperty (line 2269)

Rename a previously defined property of an object type.

  • access: public
void &data_renameObjectProperty (obj_type $obj_type, prop_name $prop_name, new_name $new_name)
  • obj_type $obj_type: object type's name
  • prop_name $prop_name: name of the property to rename
  • new_name $new_name: new name to use
data_renameObjectType (line 2203)

Rename an object type.

  • access: public
void &data_renameObjectType (obj_type $obj_type, new_name $new_name)
  • obj_type $obj_type: object type's name
  • new_name $new_name: new object type's name
data_setAssociation (line 2706)

Create or modify an association between two objects.

  • access: public
void &data_setAssociation (name $name, obj_id1 $obj_id1, obj_id2 $obj_id2, [data $data = null], [assoc_time $assoc_time = null])
  • name $name: name of association
  • obj_id1 $obj_id1: id of first object
  • obj_id2 $obj_id2: id of second object
  • data $data: (optional) extra string data to store
  • assoc_time $assoc_time: (optional) extra time data; default to creation time
data_setAssociations (line 2729)

Create or modify associations between objects.

  • access: public
void &data_setAssociations (assocs $assocs, [name $name = null])
  • assocs $assocs: associations to set
  • name $name: (optional) name of association
data_setCookie (line 1142)

Sets cookies according to the params specified.

  • return: true on success
  • access: public
bool data_setCookie (int $uid, string $name, string $value, int $expires, string $path)
  • int $uid: User for which the cookies are needed.
  • string $name: Name of the cookie
  • string $value: (Optional) if expires specified and is in the past
  • int $expires: (Optional) Expiry time
  • string $path: (Optional) Url path to associate with (default is /)
data_setHashValue (line 2510)

Write hash value by key.

  • access: public
void &data_setHashValue (obj_type $obj_type, key $key, value $value, [prop_name $prop_name = null])
  • obj_type $obj_type: object type's name
  • key $key: hash key
  • value $value: hash value
  • prop_name $prop_name: (optional) individual property's name
data_setObjectProperty (line 2465)

Set a single property value of an object.

  • access: public
void &data_setObjectProperty (obj_id $obj_id, prop_name $prop_name, prop_value $prop_value)
  • obj_id $obj_id: object's id
  • prop_name $prop_name: individual property's name
  • prop_value $prop_value: new value to set
data_setUserPreference (line 2087)

Set a user preference.

  • access: public
void &data_setUserPreference (pref_id $pref_id, value $value, [uid $uid = null])
  • pref_id $pref_id: preference identifier (0-200)
  • value $value: preferece's value
  • uid $uid: the user id (defaults to current session user)
data_setUserPreferences (line 2108)

Set a user's all preferences for this application.

  • access: public
void &data_setUserPreferences (values $values, [replace $replace = false], [uid $uid = null])
  • values $values: preferece values in an associative arrays
  • replace $replace: whether to replace all existing preferences or merge into them.
  • uid $uid: the user id (defaults to current session user)
data_undefineAssociation (line 2626)

Undefine an object association.

  • access: public
void &data_undefineAssociation (name $name)
  • name $name: name of this association
data_undefineObjectProperty (line 2247)

Remove a previously defined property from an object type.

  • access: public
void &data_undefineObjectProperty (obj_type $obj_type, prop_name $prop_name)
  • obj_type $obj_type: object type's name
  • prop_name $prop_name: name of the property to remove
data_updateObject (line 2345)

Update an existing object.

  • access: public
void &data_updateObject (obj_id $obj_id, properties $properties, [replace $replace = false])
  • obj_id $obj_id: object's id
  • properties $properties: new properties
  • replace $replace: true for replacing existing properties; false for merging
end_batch (line 187)
  • access: public
void end_batch ()
end_permissions_mode (line 250)
  • access: public
void end_permissions_mode ()
events_cancel (line 530)

Cancels an event. Only works for events where application is the admin.

  • return: true if successful
  • access: public
bool &events_cancel (int $eid, [string $cancel_message = ''])
  • int $eid: event id
  • string $cancel_message: (Optional) message to send to members of the event about why it is cancelled
events_create (line 545)

Creates an event on behalf of the user is there is a session, otherwise on behalf of app. Successful creation guarantees app will be admin.

  • return: event id
  • access: public
int events_create (assoc $event_info, [string $file = null])
  • string $file: (Optional) filename of picture to set
  • assoc $event_info: array $event_info json encoded event information
events_edit (line 566)

Edits an existing event. Only works for events where application is admin.

  • return: true if successful
  • access: public
bool events_edit (int $eid, assoc $event_info, [string $file = null])
  • int $eid: event id
  • string $file: (Optional) filename of new picture to set
  • assoc $event_info: array $event_info json encoded event information
events_get (line 480)

Returns events according to the filters specified.

  • return: The events matching the query.
  • access: public
array &events_get ([int $uid = null], [array/string $eids = null], [int $start_time = null], [int $end_time = null], [string $rsvp_status = null])
  • int $uid: (Optional) User associated with events. A null parameter will default to the session user.
  • array/string $eids: (Optional) Filter by these event ids. A null parameter will get all events for the user. (A csv list will work but is deprecated)
  • int $start_time: (Optional) Filter with this unix time as lower bound. A null or zero parameter indicates no lower bound.
  • int $end_time: (Optional) Filter with this UTC as upper bound. A null or zero parameter indicates no upper bound.
  • string $rsvp_status: (Optional) Only show events where the given uid has this rsvp status. This only works if you have specified a value for $uid. Values are as in events.getMembers. Null indicates to ignore rsvp status when filtering.
events_getMembers (line 501)

Returns membership list data associated with an event.

  • return: An assoc array of four membership lists, with keys 'attending', 'unsure', 'declined', and 'not_replied'
  • access: public
array &events_getMembers (int $eid)
  • int $eid: event id
events_rsvp (line 514)

RSVPs the current user to this event.

  • return: true if successful
  • access: public
bool &events_rsvp (int $eid, string $rsvp_status)
  • int $eid: event id
  • string $rsvp_status: 'attending', 'unsure', or 'declined'
fbml_deleteCustomTags (line 694)

Delete custom tags the application has registered. If $tag_names is null, all the application's custom tags will be deleted.

IMPORTANT: If your application has registered public tags that other applications may be using, don't delete those tags! Doing so can break the FBML ofapplications that are using them.

  • return: true on success
  • access: public
bool &fbml_deleteCustomTags ([array $tag_names = null])
  • array $tag_names: the names of the tags to delete (optinal)
fbml_getCustomTags (line 676)

Get the custom tags for an application. If $app_id is not specified, the calling app's tags are returned.

If $app_id is different from the id of the calling app, only the app's public tags are returned. The return value is an array of the same type as the $tags parameter of fbml_registerCustomTags().

  • return: an array containing the custom tag objects
  • access: public
mixed &fbml_getCustomTags ([int $app_id = null])
  • int $app_id: the application's id (optional)
fbml_refreshImgSrc (line 588)

Fetches and re-caches the image stored at the given URL, for use in images published to non-canvas pages via the API (for example, to user profiles via profile.setFBML, or to News Feed via feed.publishUserAction).

  • return: true on success
  • access: public
bool &fbml_refreshImgSrc (string $url)
  • string $url: The absolute URL from which to refresh the image.
fbml_refreshRefUrl (line 602)

Fetches and re-caches the content stored at the given URL, for use in an fb:ref FBML tag.

  • return: true on success
  • access: public
bool &fbml_refreshRefUrl (string $url)
  • string $url: The absolute URL from which to fetch content. This URL should be used in a fb:ref FBML tag.
fbml_registerCustomTags (line 658)

Register custom tags for the application. Custom tags can be used to extend the set of tags available to applications in FBML markup.

Before you call this function, make sure you read the full documentation at

http://wiki.developers.facebook.com/index.php/Fbml.RegisterCustomTags

IMPORTANT: This function overwrites the values of existing tags if the names match. Use this function with care because it may break the FBML of any application that is using the existing version of the tags.

  • return: the number of tags that were registered
  • access: public
int &fbml_registerCustomTags (mixed $tags)
  • mixed $tags: an array of tag objects (the full description is on the wiki page)
fbml_setRefHandle (line 633)

Associates a given "handle" with FBML markup so that the handle can be

used within the fb:ref FBML tag. A handle is unique within an application and allows an application to publish identical FBML to many user profiles and do subsequent updates without having to republish FBML on behalf of each user.

  • return: true on success
  • access: public
bool &fbml_setRefHandle (string $handle, string $fbml)
  • string $handle: The handle to associate with the given FBML.
  • string $fbml: The FBML to associate with the given handle.
fbml_uploadNativeStrings (line 616)

Lets you insert text strings in their native language into the Facebook Translations database so they can be translated.

  • return: Number of strings uploaded.
  • access: public
int &fbml_uploadNativeStrings (array $native_strings)
  • array $native_strings: An array of maps, where each map has a 'text' field and a 'description' field.
feed_deactivateTemplateBundleByID (line 809)

Deactivates a previously registered template bundle.

  • return: true on success
  • access: public
bool &feed_deactivateTemplateBundleByID (string $template_bundle_id)
  • string $template_bundle_id: The template bundle id
feed_getAppFriendStories (line 969)

For the current user, retrieves stories generated by the user's friends while using this application. This can be used to easily create a "News Feed" like experience.

  • return: An array of feed story objects.
  • access: public
array &feed_getAppFriendStories ()
feed_getRegisteredTemplateBundleByID (line 797)

Retrieves information about a specified template bundle previously registered by the requesting application.

  • return: Template bundle
  • access: public
array &feed_getRegisteredTemplateBundleByID (string $template_bundle_id)
  • string $template_bundle_id: The template bundle id
feed_getRegisteredTemplateBundles (line 784)

Retrieves the full list of active template bundles registered by the requesting application.

  • return: An array of template bundles
  • access: public
array &feed_getRegisteredTemplateBundles ()
feed_publishTemplatizedAction (line 711)

This method is deprecated for calls made on behalf of users. This method works only for publishing stories on a Facebook Page that has installed your application. To publish stories to a user's profile, use feed.publishUserAction instead.

For more details on this call, please visit the wiki page:

http://wiki.developers.facebook.com/index.php/Feed.publishTemplatizedAction

  • access: public
void &feed_publishTemplatizedAction ( $title_template,  $title_data,  $body_template,  $body_data,  $body_general, [ $image_1 = null], [ $image_1_link = null], [ $image_2 = null], [ $image_2_link = null], [ $image_3 = null], [ $image_3_link = null], [ $image_4 = null], [ $image_4_link = null], [ $target_ids = ''], [ $page_actor_id = null])
  • $title_template
  • $title_data
  • $body_template
  • $body_data
  • $body_general
  • $image_1
  • $image_1_link
  • $image_2
  • $image_2_link
  • $image_3
  • $image_3_link
  • $image_4
  • $image_4_link
  • $target_ids
  • $page_actor_id
feed_publishUserAction (line 840)

Publishes a story on behalf of the user owning the session, using the specified template bundle. This method requires an active session key in order to be called.

The parameters to this method ($templata_data in particular) are somewhat involved. It's recommended you visit the wiki for details:

http://wiki.developers.facebook.com/index.php/Feed.publishUserAction

  • return: true on success
  • access: public
bool &feed_publishUserAction (int $template_bundle_id, array $template_data, [array $target_ids = ''], [string $body_general = ''], [int $story_size = FacebookRestClient::STORY_SIZE_ONE_LINE], [string $user_message = ''])
  • int $template_bundle_id: A template bundle id previously registered
  • array $template_data: See wiki article for syntax
  • array $target_ids: (Optional) An array of friend uids of the user who shared in this action.
  • string $body_general: (Optional) Additional markup that extends the body of a short story.
  • int $story_size: (Optional) A story size (see above)
  • string $user_message: (Optional) A user message for a short story.
feed_registerTemplateBundle (line 752)

Registers a template bundle. Template bundles are somewhat involved, so it's recommended you check out the wiki for more details:

http://wiki.developers.facebook.com/index.php/Feed.registerTemplateBundle

  • return: A template bundle id
  • access: public
string &feed_registerTemplateBundle ( $one_line_story_templates, [ $short_story_templates = array()], [ $full_story_template = null], [ $action_links = array()])
  • $one_line_story_templates
  • $short_story_templates
  • $full_story_template
  • $action_links
finalize_params (line 3148)
  • access: protected
void finalize_params ( $method,  $params)
  • $method
  • $params
fql_multiquery (line 997)

Makes a set of FQL queries in parallel. This method takes a dictionary

of FQL queries where the keys are names for the queries. Results from one query can be used within another query to fetch additional data. More info about FQL queries at http://wiki.developers.facebook.com/index.php/FQL

  • return: generalized array representing the results
  • access: public
array &fql_multiquery (string $queries)
  • string $queries: JSON-encoded dictionary of queries to evaluate
fql_query (line 982)

Makes an FQL query. This is a generalized way of accessing all the data in the API, as an alternative to most of the other method calls. More info at http://wiki.developers.facebook.com/index.php/FQL

  • return: generalized array representing the results
  • access: public
array &fql_query (string $query)
  • string $query: the query to evaluate
friends_areFriends (line 1018)

Returns whether or not pairs of users are friends.

Note that the Facebook friend relationship is symmetric.

  • return: An array with uid1, uid2, and bool if friends, e.g.: array(0 => array('uid1' => id_1, 'uid2' => id_A, 'are_friends' => 1),
    1. => array('uid1' => id_2, 'uid2' => id_B, 'are_friends' => 0)
    ...)
  • access: public
array &friends_areFriends (array/string $uids1, array/string $uids2)
  • array/string $uids1: list of ids (id_1, id_2,...) of some length X (csv is deprecated)
  • array/string $uids2: list of ids (id_A, id_B,...) of SAME length X (csv is deprecated)
friends_get (line 1032)

Returns the friends of the current session user.

  • return: An array of friends
  • access: public
array &friends_get ([int $flid = null], [int $uid = null])
  • int $flid: (Optional) Only return friends on this friend list.
  • int $uid: (Optional) Return friends for this user.
friends_getAppUsers (line 1082)

Returns the friends of the session user, who are also users of the calling application.

  • return: An array of friends also using the app
  • access: public
array &friends_getAppUsers ()
friends_getLists (line 1072)

Returns the set of friend lists for the current session user.

  • return: An array of friend list objects
  • access: public
array &friends_getLists ()
friends_getMutualFriends (line 1061)

Returns the mutual friends between the target uid and a source uid or the current session user.

  • return: An array of friend uids
  • access: public
array &friends_getMutualFriends (int $target_uid, [int $source_uid = null])
  • int $target_uid: Target uid for which mutual friends will be found.
  • int $source_uid: (optional) Source uid for which mutual friends will be found. If no source_uid is specified, source_id will default to the session user.
getFormat (line 3080)

get the current response serialization format

  • return: 'xml', 'json', or null (which means 'xml')
  • access: public
string getFormat ()
get_uid (line 3340)
  • access: protected
void get_uid ( $uid)
  • $uid
groups_get (line 1097)

Returns groups according to the filters specified.

  • return: An array of group objects
  • access: public
array &groups_get (int $uid, array/string $gids)
  • int $uid: (Optional) User associated with groups. A null parameter will default to the session user.
  • array/string $gids: (Optional) Array of group ids to query. A null parameter will get all groups for the user. (csv is deprecated)
groups_getMembers (line 1111)

Returns the membership list of a group.

  • return: An array with four membership lists, with keys 'members', 'admins', 'officers', and 'not_replied'
  • access: public
array &groups_getMembers (int $gid)
  • int $gid: Group id
links_get (line 1161)

Retrieves links posted by the given user.

  • return: An array of links.
  • access: public
array &links_get (int $uid, int $limit, [array $link_ids = null])
  • int $uid: The user whose links you wish to retrieve
  • int $limit: The maximimum number of links to retrieve
  • array $link_ids: (Optional) Array of specific link IDs to retrieve by this user
links_post (line 1178)

Posts a link on Facebook.

  • access: public
bool &links_post (string $url, [string $comment = ''], [int $uid = null])
  • string $url: URL/link you wish to post
  • string $comment: (Optional) A comment about this link
  • int $uid: (Optional) User ID that is posting this link; defaults to current session user
marketplace_createListing (line 2060)

Create/modify a Marketplace listing for the loggedinuser.

  • return: The listing_id (unchanged if modifying an existing listing).
int marketplace_createListing (int $listing_id, show_on_profile $show_on_profile, listing_attrs $attrs, [ $uid = null])
  • int $listing_id: listing_id The id of a listing to be modified, 0 for a new listing.
  • show_on_profile $show_on_profile: bool Should we show this listing on the user's profile
  • listing_attrs $attrs: array An array of the listing data
  • $uid
marketplace_getCategories (line 1985)

Get all the marketplace categories.

  • return: A list of category names
array marketplace_getCategories ()
marketplace_getListings (line 2010)

Get listings by either listing_id or user.

  • return: The data for matched listings
array marketplace_getListings (listing_ids $listing_ids, uids $uids)
  • listing_ids $listing_ids: An array of listing_ids (optional)
  • uids $uids: An array of user ids (optional)
marketplace_getSubCategories (line 1997)

Get all the marketplace subcategories for a particular category.

  • return: A list of subcategory names
array marketplace_getSubCategories (category $category)
  • category $category: The category for which we are pulling subcategories
marketplace_removeListing (line 2040)

Remove a listing from Marketplace.

  • return: True on success
bool marketplace_removeListing (listing_id $listing_id, [status $status = 'DEFAULT'], [ $uid = null])
  • listing_id $listing_id: The id of the listing to be removed
  • status $status: 'SUCCESS', 'NOT_SUCCESS', or 'DEFAULT'
  • $uid
marketplace_search (line 2025)

Search for Marketplace listings. All arguments are optional, though at least one must be filled out to retrieve results.

  • return: The data for matched listings
array marketplace_search (category $category, subcategory $subcategory, query $query)
  • category $category: The category in which to search (optional)
  • subcategory $subcategory: The subcategory in which to search (optional)
  • query $query: A query string (optional)
notes_create (line 1289)

Creates a note with the specified title and content.

  • return: The ID of the note that was just created.
  • access: public
int &notes_create (string $title, string $content, [int $uid = null])
  • string $title: Title of the note.
  • string $content: Content of the note.
  • int $uid: (Optional) The user for whom you are creating a note; defaults to current session user
notes_delete (line 1305)

Deletes the specified note.

  • access: public
bool &notes_delete (int $note_id, [int $uid = null])
  • int $note_id: ID of the note you wish to delete
  • int $uid: (Optional) Owner of the note you wish to delete; defaults to current session user
notes_edit (line 1323)

Edits a note, replacing its title and contents with the title and contents specified.

  • access: public
bool &notes_edit (int $note_id, string $title, string $content, [int $uid = null])
  • int $note_id: ID of the note you wish to edit
  • string $title: Replacement title for the note
  • string $content: Replacement content for the note
  • int $uid: (Optional) Owner of the note you wish to edit; defaults to current session user
notes_get (line 1343)

Retrieves all notes by a user. If note_ids are specified, retrieves only those specific notes by that user.

  • return: A list of all of the given user's notes, or an empty list if the viewer lacks permissions or if there are no visible notes.
  • access: public
array &notes_get (int $uid, [array $note_ids = null])
  • int $uid: User whose notes you wish to retrieve
  • array $note_ids: (Optional) List of specific note IDs by this user to retrieve
notifications_get (line 1358)

Returns the outstanding notifications for the session user.

  • return: An assoc array of notification count objects for 'messages', 'pokes' and 'shares', a uid list of 'friend_requests', a gid list of 'group_invites', and an eid list of 'event_invites'
  • access: public
array &notifications_get ()
notifications_send (line 1369)

Sends a notification to the specified users.

  • return: comma-separated list of successful recipients
  • access: public
A &notifications_send ( $to_ids,  $notification,  $type)
  • $to_ids
  • $notification
  • $type
notifications_sendEmail (line 1388)

Sends an email to the specified user of the application.

  • return: A comma-separated list of successful recipients
  • access: public
string &notifications_sendEmail (array/string $recipients, string $subject, string $text, string $fbml)
  • array/string $recipients: array of ids of the recipients (csv is deprecated)
  • string $subject: subject of the email
  • string $text: (plain text) body of the email
  • string $fbml: fbml markup for an html version of the email
pages_getInfo (line 1411)

Returns the requested info fields for the requested set of pages.

  • return: An array of pages
  • access: public
array &pages_getInfo (array/string $page_ids, array/string $fields, int $uid, string $type)
  • array/string $page_ids: an array of page ids (csv is deprecated)
  • array/string $fields: an array of strings describing the info fields desired (csv is deprecated)
  • int $uid: (Optional) limit results to pages of which this user is a fan.
  • string $type: type limits results to a particular type of page.
pages_isAdmin (line 1427)

Returns true if the given user is an admin for the passed page.

  • return: true on success
  • access: public
bool &pages_isAdmin (int $page_id, [int $uid = null])
  • int $page_id: target page id
  • int $uid: (Optional) user id (defaults to the logged-in user)
pages_isAppAdded (line 1440)

Returns whether or not the given page has added the application.

  • return: true on success
  • access: public
bool &pages_isAppAdded (int $page_id)
  • int $page_id: target page id
pages_isFan (line 1453)

Returns true if logged in user is a fan for the passed page.

  • return: true on success
  • access: public
bool &pages_isFan (int $page_id, [int $uid = null])
  • int $page_id: target page id
  • int $uid: user to compare. If empty, the logged in user.
payments_getOrderDetails (line 1256)
  • access: public
void payments_getOrderDetails ( $order_id)
  • $order_id
payments_getOrders (line 1270)
  • access: public
void payments_getOrders ( $status,  $start_time,  $end_time, [ $test_mode = false])
  • $status
  • $start_time
  • $end_time
  • $test_mode
payments_setProperties (line 1251)

Set Payments properties for an app.

  • return: on success
  • access: public
true payments_setProperties (properties $properties)
  • properties $properties: a map from property names to values
payments_updateOrder (line 1262)
  • access: public
void payments_updateOrder ( $order_id,  $status,  $params)
  • $order_id
  • $status
  • $params
pending_batch (line 203)

are we currently queueing up calls for a batch?

  • access: public
void pending_batch ()
permissions_checkAvailableApiAccess (line 1208)

Checks API-access granted to self by the specified application.

  • return: API methods/namespaces which are allowed access
  • access: public
array permissions_checkAvailableApiAccess (string $permissions_apikey)
  • string $permissions_apikey: Other application key
permissions_checkGrantedApiAccess (line 1196)

Checks API-access granted by self to the specified application.

  • return: API methods/namespaces which are allowed access
  • access: public
array permissions_checkGrantedApiAccess (string $permissions_apikey)
  • string $permissions_apikey: Other application key
permissions_grantApiAccess (line 1223)

Grant API-access to the specified methods/namespaces to the specified application.

  • return: API methods/namespaces which are allowed access
  • access: public
array permissions_grantApiAccess (string $permissions_apikey, array(string) $method_arr)
  • string $permissions_apikey: Other application key
  • array(string) $method_arr: (Optional) API methods/namespaces allowed
permissions_revokeApiAccess (line 1236)

Revoke API-access granted to the specified application.

  • return: true on success
  • access: public
bool permissions_revokeApiAccess (string $permissions_apikey)
  • string $permissions_apikey: Other application key
photos_addTag (line 1486)

Adds a tag with the given information to a photo. See the wiki for details:

http://wiki.developers.facebook.com/index.php/Photos.addTag

  • return: true on success
  • access: public
bool &photos_addTag (int $pid, int $tag_uid, string $tag_text, float $x, float $y, array $tags, [int $owner_uid = 0])
  • int $pid: The ID of the photo to be tagged
  • int $tag_uid: The ID of the user being tagged. You must specify either the $tag_uid or the $tag_text parameter (unless $tags is specified).
  • string $tag_text: Some text identifying the person being tagged. You must specify either the $tag_uid or $tag_text parameter (unless $tags is specified).
  • float $x: The horizontal position of the tag, as a percentage from 0 to 100, from the left of the photo.
  • float $y: The vertical position of the tag, as a percentage from 0 to 100, from the top of the photo.
  • array $tags: (Optional) An array of maps, where each map can contain the tag_uid, tag_text, x, and y parameters defined above. If specified, the individual arguments are ignored.
  • int $owner_uid: (Optional) The user ID of the user whose photo you are tagging. If this parameter is not specified, then it defaults to the session user.
photos_createAlbum (line 1518)

Creates and returns a new album owned by the specified user or the current session user.

  • return: An album object
  • access: public
array &photos_createAlbum (string $name, [string $description = ''], [string $location = ''], [string $visible = ''], [int $uid = 0])
  • string $name: The name of the album.
  • string $description: (Optional) A description of the album.
  • string $location: (Optional) A description of the location.
  • string $visible: (Optional) A privacy setting for the album. One of 'friends', 'friends-of-friends', 'networks', or 'everyone'. Default 'everyone'.
  • int $uid: (Optional) User id for creating the album; if not specified, the session user is used.
photos_get (line 1545)

Returns photos according to the filters specified.

  • return: An array of photo objects.
  • access: public
array &photos_get (int $subj_id, int $aid, array/string $pids)
  • int $subj_id: (Optional) Filter by uid of user tagged in the photos.
  • int $aid: (Optional) Filter by an album, as returned by photos_getAlbums.
  • array/string $pids:

    (Optional) Restrict to an array of pids (csv is deprecated)

    Note that at least one of these parameters needs to be specified, or an error is returned.

photos_getAlbums (line 1562)

Returns the albums created by the given user.

  • return: array of album objects.
  • access: public
an &photos_getAlbums (int $uid, string $aids)
  • int $uid: (Optional) The uid of the user whose albums you want. A null will return the albums of the session user.
  • string $aids:

    (Optional) An array of aids to restrict the query. (csv is deprecated)

    Note that at least one of the (uid, aids) parameters must be specified.

photos_getTags (line 1577)

Returns the tags on all photos specified.

  • return: An array of photo tag objects, which include pid, subject uid, and two floating-point numbers (xcoord, ycoord) for tag pixel location.
  • access: public
array &photos_getTags (string $pids)
  • string $pids: A list of pids to query
photos_upload (line 1594)

Uploads a photo.

  • return: An array of user objects
  • access: public
array photos_upload (string $file, [int $aid = null], [string $caption = null], [int $uid = null])
  • string $file: The location of the photo on the local filesystem.
  • int $aid: (Optional) The album into which to upload the photo.
  • string $caption: (Optional) A caption for the photo.
  • int $uid: uid (Optional) The user ID of the user whose photo you are uploading
post_request (line 3235)
  • access: public
void post_request ( $method,  $params)
  • $method
  • $params
profile_getFBML (line 1905)

Gets the FBML for the profile box that is currently set for a user's profile (your application set the FBML previously by calling the profile.setFBML method).

  • return: The FBML
  • access: public
string &profile_getFBML ([int $uid = null], [int $type = null])
  • int $uid: (Optional) User id to lookup; defaults to session.
  • int $type: (Optional) 1 for original style, 2 for profile_main boxes
profile_getInfo (line 1923)

Returns the specified user's application info section for the calling application. These info sections have either been set via a previous profile.setInfo call or by the user editing them directly.

  • return:

    Info fields for the current user. See wiki for structure:

    http://wiki.developers.facebook.com/index.php/Profile.getInfo

  • access: public
array &profile_getInfo ([int $uid = null])
  • int $uid: (Optional) User id to lookup; defaults to session.
profile_getInfoOptions (line 1936)

Returns the options associated with the specified info field for an application info section.

  • return: An array of info options.
  • access: public
array &profile_getInfoOptions (string $field)
  • string $field: The title of the field
profile_setFBML (line 1880)

Sets the FBML for the profile of the user attached to this session.

  • return: A list of strings describing any compile errors for the submitted FBML
array profile_setFBML (string $markup, [int $uid = null], [string $profile = ''], [string $profile_action = ''], [string $mobile_profile = ''], [string $profile_main = ''])
  • string $markup: The FBML that describes the profile presence of this app for the user
  • int $uid: The user
  • string $profile: Profile FBML
  • string $profile_action: Profile action FBML (deprecated)
  • string $mobile_profile: Mobile profile FBML
  • string $profile_main: Main Tab profile FBML
profile_setInfo (line 1955)

Configures an application info section that the specified user can install on the Info tab of her profile. For details on the structure of an info field, please see:

http://wiki.developers.facebook.com/index.php/Profile.setInfo

  • return: true on success
  • access: public
bool &profile_setInfo (string $title, int $type, array $info_fields, [int $uid = null])
  • string $title: Title / header of the info section
  • int $type:
    1. for text-only, 5 for thumbnail views
  • array $info_fields: An array of info fields. See wiki for details.
  • int $uid: (Optional)
profile_setInfoOptions (line 1974)

Specifies the objects for a field for an application info section. These options populate the typeahead for a thumbnail.

  • return: true on success
  • access: public
bool profile_setInfoOptions (string $field, array $options)
  • string $field: The title of the field
  • array $options: An array of items for a thumbnail, including 'label', 'link', and optionally 'image', 'description' and 'sublabel'
setFormat (line 3070)

Change the response format

  • access: public
void setFormat (string $format)
  • string $format: The response format (json, xml)
set_user (line 155)

Set the default user id for methods that allow the caller to pass an uid parameter to identify the target user instead of a session key. This currently applies to the user preferences methods.

  • access: public
void set_user ($uid $uid)
  • $uid $uid: int the user id
set_use_curl_if_available (line 166)

Normally, if the cURL library/PHP extension is available, it is used for HTTP transactions. This allows that behavior to be overridden, falling back to a vanilla-PHP implementation even if cURL is installed.

  • access: public
void set_use_curl_if_available ($use_curl_if_available $use_curl_if_available)
  • $use_curl_if_available $use_curl_if_available: bool whether or not to use cURL if available
set_use_ssl_resources (line 262)
  • access: public
void set_use_ssl_resources ([ $is_ssl = true])
  • $is_ssl
stream_addComment (line 911)

Add a comment to a stream post

  • return: the id of the created comment
  • access: public
string stream_addComment ($post_id $post_id, $comment $comment, [$uid $uid = null])
  • $post_id $post_id: the post id
  • $comment $comment: the comment text
  • $uid $uid: the actor (defaults to session user)
stream_addLike (line 941)

Add a like to a stream post

  • access: public
bool stream_addLike ($post_id $post_id, [$uid $uid = null])
  • $post_id $post_id: the post id
  • $uid $uid: the actor (defaults to session user)
stream_get (line 1821)

Gets the stream on behalf of a user using a set of users. This call will return the latest $limit queries between $start_time and $end_time.

  • return: 'posts' => array of posts, // if requested, the following data may be returned 'profiles' => array of profile metadata of users/pages in posts 'albums' => array of album metadata in posts 'photo_tags' => array of photo_tags for photos in posts )
  • access: public
array( &stream_get ([int $viewer_id = null], [array $source_ids = null], [int $start_time = 0], [int $end_time = 0], [int $limit = 30], [string $filter_key = ''], array $metadata)
  • int $viewer_id: user making the call (def: session)
  • array $source_ids: users/pages to look at (def: all connections)
  • int $start_time: start time to look for stories (def: 1 day ago)
  • int $end_time: end time to look for stories (def: now)
  • int $limit: number of stories to attempt to fetch (def: 30)
  • string $filter_key: key returned by stream.getFilters to fetch
  • array $metadata: metadata to include with the return, allows requested metadata to be returned, such as profiles, albums, photo_tags
stream_getComments (line 1861)

Gets the full comments given a post_id from stream.get or the stream FQL table. Initially, only a set of preview comments are returned because some posts can have many comments.

  • return: of comment objects
  • access: public
array &stream_getComments (string $post_id)
  • string $post_id: id of the post to get comments for
stream_getFilters (line 1847)

Gets the filters (with relevant filter keys for stream.get) for a particular user. These filters are typical things like news feed, friend lists, networks. They can be used to filter the stream without complex queries to determine which ids belong in which groups.

  • return: of stream filter objects
  • access: public
array &stream_getFilters ([int $uid = null])
  • int $uid: user to get filters for
stream_publish (line 875)

Publish a post to the user's stream.

  • return: the post id
  • access: public
string stream_publish ($message $message, [$attachment $attachment = null], [$action $action_links = null], [$target_id $target_id = null], [$uid $uid = null])
  • $message $message: the user's message
  • $attachment $attachment: the post's attachment (optional)
  • $action $action_links: links the post's action links (optional)
  • $target_id $target_id: the user on whose wall the post will be posted (optional)
  • $uid $uid: the actor (defaults to session user)
stream_remove (line 896)

Remove a post from the user's stream.

Currently, you may only remove stories you application created.

  • access: public
bool stream_remove ($post_id $post_id, [$uid $uid = null])
  • $post_id $post_id: the post id
  • $uid $uid: the actor (defaults to session user)
stream_removeComment (line 927)

Remove a comment from a stream post

  • access: public
bool stream_removeComment ($comment_id $comment_id, [$uid $uid = null])
  • $comment_id $comment_id: the comment id
  • $uid $uid: the actor (defaults to session user)
stream_removeLike (line 955)

Remove a like from a stream post

  • access: public
bool stream_removeLike ($post_id $post_id, [$uid $uid = null])
  • $post_id $post_id: the post id
  • $uid $uid: the actor (defaults to session user)
users_getInfo (line 1639)

Returns the requested info fields for the requested set of users.

  • return: An array of user objects
  • access: public
array &users_getInfo (array/string $uids, array/string $fields)
  • array/string $uids: An array of user ids (csv is deprecated)
  • array/string $fields: An array of info field names desired (csv is deprecated)
users_getLoggedInUser (line 1671)

Returns the user corresponding to the current session object.

  • return: User id
  • access: public
integer &users_getLoggedInUser ()
users_getStandardInfo (line 1660)

Returns the requested info fields for the requested set of users. A session key must not be specified. Only data about users that have authorized your application will be returned.

Check the wiki for fields that can be queried through this API call. Data returned from here should not be used for rendering to application users, use users.getInfo instead, so that proper privacy rules will be applied.

  • return: An array of user objects
  • access: public
array &users_getStandardInfo (array/string $uids, array/string $fields)
  • array/string $uids: An array of user ids (csv is deprecated)
  • array/string $fields: An array of info field names desired (csv is deprecated)
users_hasAppPermission (line 1681)

Returns 1 if the user has the specified permission, 0 otherwise.

http://wiki.developers.facebook.com/index.php/Users.hasAppPermission

  • return: 1 or 0
  • access: public
integer &users_hasAppPermission ( $ext_perm, [ $uid = null])
  • $ext_perm
  • $uid
users_isAppUser (line 1692)

Returns whether or not the user corresponding to the current session object has the give the app basic authorization.

  • return: true if the user has authorized the app
  • access: public
boolean &users_isAppUser ([ $uid = null])
  • $uid
users_isVerified (line 1707)

Returns whether or not the user corresponding to the current session object is verified by Facebook. See the documentation for Users.isVerified for details.

  • return: true if the user is verified
  • access: public
boolean &users_isVerified ()
users_setStatus (line 1728)

Sets the users' current status message. Message does NOT contain the word "is" , so make sure to include a verb.

Example: setStatus("is loving the API!") will produce the status "Luke is loving the API!"

  • access: public
boolean &users_setStatus (string $status, [int $uid = null], [bool $clear = false], [bool $status_includes_verb = true])
  • string $status: text-only message to set
  • int $uid: user to set for (defaults to the logged-in user)
  • bool $clear: whether or not to clear the status, instead of setting it
  • bool $status_includes_verb: if true, the word "is" will *not* be prepended to the status message
video_getUploadLimits (line 1627)

Returns an array with the video limitations imposed on the current session's associated user. Maximum length is measured in seconds; maximum size is measured in bytes.

  • return: Array with "length" and "size" keys
  • access: public
array &video_getUploadLimits ()
video_upload (line 1612)

Uploads a video.

  • return: An array with the video's ID, title, description, and a link to view it on Facebook.
  • access: public
array video_upload (string $file, [string $title = null], [string $description = null])
  • string $file: The location of the video on the local filesystem.
  • string $title: (Optional) A title for the video. Titles over 65 characters in length will be truncated.
  • string $description: (Optional) A description for the video.
Class Constants
BATCH_MODE_DEFAULT = 0 (line 88)
BATCH_MODE_SERIAL_ONLY = 2 (line 90)
BATCH_MODE_SERVER_PARALLEL = 0 (line 89)
STORY_SIZE_FULL = 4 (line 816)
STORY_SIZE_ONE_LINE = 1 (line 814)
STORY_SIZE_SHORT = 2 (line 815)

Documentation generated on Sun, 02 Jan 2011 23:14:14 +0000 by phpDocumentor 1.4.3