- if (strstr($item['url'], 'facebook.com')) {
- $hash = hash('ripemd128', item['url']);
- $_REQUEST['extid'] = NETWORK_FACEBOOK;
- $_REQUEST['message_id'] = item_new_uri($a->get_hostname(), $uid, NETWORK_FACEBOOK . ':' . $hash);
+ if (!empty($item['url']) && strstr($item['url'], 'facebook.com')) {
+ $hash = hash('ripemd128', $item['url']);
+ $_REQUEST['extid'] = Protocol::FACEBOOK;
+ $_REQUEST['message_id'] = Item::newURI($uid, Protocol::FACEBOOK . ':' . $hash);