how to insert directly to field_video??

i use this php code. but it's not working.

$url="http://www.youtube.com/watch?v=xxxxxxxx";
.
.
.
  $node->body = $feed_item->description;
  $node->teaser = node_teaser($node->body);
  $node->field_video =  $url;
.
.
    node_save($node);

Comments

dindon’s picture

anyone??
which hook should be called to process embed value?

garamvideos’s picture

$node->field_video[0]['embed'] = $url
should do the trick

alex ua’s picture

Status: Active » Closed (fixed)