I'm working on a custom import plugin which needs to import a load of content to fields including categories and tags. Categories is working fine using a comma separated list of category ids:
$entry = new EntryModel();
$entry->authorId = $eventObject->author;
$entry->enabled = true;
$entry->postDate = $eventObject->postDate;
$entry->getContent()->title = $eventObject->title;
$entry->getContent()->setAttributes(array(
'slug' => $eventObject->slug,
'locationText' => $eventObject->locationText,
'date' => $eventObject->eventDate,
'overview' => $eventObject->overview,
'eventWebsite' => $eventObject->eventWebsite,
'eventCategories' => $eventObject->categories,
'location' => $eventObject->location,
'eventTags' => 1453,
));
I just can't get tags importing at all, also need to create new tags where a tag doesn't already exist! Testing with the id 1453which is an existing tag id.