imagineerThat
imagineerThat

Reputation: 5553

How does one set up a shared feed amongst all users?

I want to set up a shared team feed that allows multiple users to post to. An example is using the to field as described in the docs, where some_team is a feed:

'to': ['some_team']

I would like to provide each user with a single Stream generated token that enables them to create their own posts, comment on others' posts, and like others' posts on this feed. I would also like them to be able to view all posts on this feed. This is basically how I'd imagine a shared feed works on facebook, etc...

However, base on the Rest API documentation, this doesn't seem possible with the constructs for generating tokens:

The resource field of the JWT payload allows you to define which API endpoints can be accessed, you can pick *one* of the following [resources]:

For example, I can create a user called username, and provide it read access to all resources (feed, activities, etc...) on some_teamusername, but this would prevent write access to new activities for that user.

token = client.create_user_token("username", **{
        "resource": "*", <--- must be one 
        "action": "read", <--- singular relationship to resource
        "feed_id": "some_teamusername"});

There should be a simple way to permit read access of others' posts on a shared feed but allow write access to your own content (posts, comments, likes).

Upvotes: 1

Views: 111

Answers (1)

Scott Lasica
Scott Lasica

Reputation: 344

I can make that feed group globally writable if that's what you're trying to do?

Upvotes: 0

Related Questions