// old
feed.addActivity({ foreign_id: "update:123" });
// new
feed.addActivity({ id: "update:123" });V2 to V3 Migration
Our team is working on an automated V2 to V3 migration system. On this page you can read what changed in the API:
V3 changes
Backend vs Client side
One of the largest changes is that in V2 we recommended a backend integration. V3 is built with both front-end and backend integrations in mind.
Users
User data on feeds 3.0 is shared with our video and chat products.
Feeds
Feeds need to be created before being used. So in the past you could add an activity to a feed and the feed would be automatically created.
In V3 you need to create the feed before adding activities to it. Feeds also have an owner which influences how client side permissions work.
SDKs
V3 comes with new SDKs so you want to use the modern SDKs.
Foreign ID vs ID
In v2 you needed to use a foreign id to indicate the uniqueness of activities and map it your system. In V3 of the API this has been replaced by making it possible to specify an ID when creating an activity
Activity structure
// old
activity = {
actor: "john",
verb: "post",
text: "day in NYC",
image_url: "my image",
to: ["user:a", "user:b"],
};
// new
activity = {
user: "john",
type: "post",
text: "day in NYC",
attachments: [{ type: "image", image_url: "" }],
feeds: ["user:a", "user:b"],
};1000 Feed pagination limit
V2 of feeds has a limitation that you can only read up to 1000 activities in a feed. V3 has several changes related to this
- You can change a feed’s activity selectors to include certain feeds or queries of activities. This means you can include popular content or content close to the user (geolocation).
- It’s possible to query activities
Comments
Comments are no longer implemented with reactions. They’re a separate entity, comments can be nested in any depth.
Aggregated, Notification and Flat feeds
Aggregated and notification feeds are no longer a separate feed type in V3. Aggregation and notification are now just settings on the feed. This makes it easier to switch between how your feeds work.
V3 API specification file
To following API specification files contain all feeds v3 API endpoints and the request and response schemas.
Migration guide
The migration guide will be online soon. The final preparations are currently being made to the migrations system.