You are here

function fb_friend_write_record in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 contrib/fb_friend.module \fb_friend_write_record()
2 calls to fb_friend_write_record()
fb_friend_request_accept_page in contrib/fb_friend.module
fb_friend_write_records in contrib/fb_friend.module

File

contrib/fb_friend.module, line 516
This module implements several features specific to Facebook friend networks.

Code

function fb_friend_write_record(&$row, $update = array()) {
  if (!isset($row['created'])) {
    $row['created'] = REQUEST_TIME;
  }
  if (!isset($row['fbu_actor'])) {
    $row['fbu_actor'] = fb_facebook_user();
  }
  if (!isset($row->label) && isset($GLOBALS['_fb_app'])) {
    $row['label'] = $GLOBALS['_fb_app']->label;
  }
  return drupal_write_record('fb_friend', $row, $update);
}