A PHP implementation of the Activity Streams 2.0 specification

Software License Latest Version on Packagist Total Downloads

This package is in active development, this is not a complete implementation of ActivityStreams 2.0

A modern AS2 php library. At the moment, only the object model type is partially implemented. I look forward to getting this feature complete by the end of summer 2017.


Via Composer

$ composer require dansup/php-activitystreams


Lets create a basic object model and echo the response to a json encoded string.

use Dansup\ActivityStreams\ServerFactory;

$item = ServerFactory::create('object');

$item->name('Our Weather Is Fine');
$item->content('I feel that the weather is appropriate to our season and location.');
  'id' => '',
  'type' => 'Person',
  'name' => 'Joe Smith'
$item->addField('url', '');

echo $item->get();


 "@context": "https:\/\/\/ns\/activitystreams",
 "type": "Note",
 "id": "http:\/\/\/note\/123",
 "name": "Our Weather Is Fine",
 "attributedTo": {
     "id": "http:\/\/\/",
     "type": "Person",
     "name": "Joe Smith"
 "content": "I feel that the weather is appropriate to our season and location.",
 "published": "2017-04-21T01:31:20+00:00",
 "url": "http:\/\/\/permalink\/123"

Change log

Please see CHANGELOG for more information what has changed recently.


$ composer test


Please see CONTRIBUTING and CONDUCT for details.


If you discover any security related issues, please email instead of using the issue tracker.



The MIT License (MIT). Please see License File for more information.

Php Activitystreams

Activity Streams is a simple specification used to describe social actions around the web.

Php Activitystreams Info

⭐ Stars 16
🔗 Homepage
🔗 Source Code
🕒 Last Update a year ago
🕒 Created 6 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author dansup