2

我想广播一些活动,例如“用户加入”让所有成员看到。目前我有一个平坦的user饲料。有没有办法推动一个活动,让每个人都能看到它?

4

1 回答 1

3

您可以使用 TO 字段将活动添加到全局提要。例如:

// Instantiate a feed using feed class 'user' and user id '1'
var user1 = client.feed('user', '1');
// Add an activity to the feed
var activity = {"to": ["user:global"], "actor": "User:1", "verb": "pin", "object": "Place:42", "target": "Board:1"};
user1.addActivity(activity)
// activity is added to both user:1 as well as user:global

或者,您可以拥有 1 个编辑帐户,然后是所有用户。

于 2016-09-16T16:54:40.347 回答