- header('Content-Type: application/json; charset=utf-8');
- $doc = new ActivityStreamJSONDocument($this->auth_user);
- $doc->setTitle($title);
- $doc->addLink($link,'alternate', 'text/html');
+ header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
+ $doc = new ActivityStreamJSONDocument($this->auth_user, $title);
+ $doc->addLink($link, 'alternate', 'text/html');