What is the best way to add a user feed to his own timeline? - getstream-io

I would like to build an Instagram-like social app, where on the user timeline, you also have his own activities displayed. My first thought was to follow his own user feed but from what I read in this blog post: https://getstream.io/blog/best-practices-for-instagram-style-feeds/
We recommend blocking a user's timeline feed from following their own user feed
Can someone explain why it would be a bad practice ? How could I implement my use case if that is the case ?
Thanks !

Looking at this myself. I think the logic they describe is incorrect. The full statement in context make a little more sense in terms of what I think they mean.
We recommend blocking a user's timeline feed from following their own
user feed, and also blocking users from seeing/following another
user's timeline feed.
The first part of the sentence I believe is backwards. What I think it should says is that the "user" feed should be blocked from following the "timeline" feed. The user feed should just contain actions that the user performed, so it shouldn't contain data from the timeline feed. But if you want the user's activities to appear in the timeline feed than it seems to me that you should definetly make the user's timeline feed follow thier user feed, and prevent the user's timeline feed from unfollowing their own user feed.
The second part that says you should block users from following another user's timeline feed. I believe this is correct because the timeline feed is a series of peronalised items for an individual user. It doesn't make sense to follow another user's timeline feed.
This is how I have implemented my logic and it seems to be working so far, but if I come across any issues with it I'll come back here and update this answer.

Related

What type of feed is most appropriate for a feed in a user profile that shows all of the posts that he or she has voted on?

I am writing an app where users can make posts.
Each post has a vote button. In the user's profile page, I would like to have a feed that shows all posts that were voted on by the user.
In this case, should I create a Flat Feed named "voted"? Then, would I add an activity to "voted" each time a user clicks on the vote button of a post? Is this best way?
I am new to the getstream API so any feedback to enhance my understanding of the API and its possibilities would be much appreciated. Thank you.
It seems that "vote" action in my case would be best represented as a "reaction" in the getstream API. So, the write up on reactions in the docs seems to be a good starting point: Reactions

Retrieving a post's likes

In my application, I have a 'user_post' feed which is responsible for storing the posts of a user. I would like a way to retrieve the likes of each individual post.
If I added a feed called 'post_like' I could store the likes of each post in their own feed. Is this approach efficient?
I'd suggest using a notification feed for that, not a flat feed. Set the verb to 'like' or whatever is appropriate for your app, and the actor is the user who 'liked' the original activity. When you call the user's notification feed, you'll get a list of all users who liked it.
If you store the likes in your own database and send the like to us with a foreign ID then you can always remove the activity later if they 'un-like' something afterward.

getstream.io disable the fanout notification when a feed follows another

I have this scenario:
A user follows a feed and they receive all of that feed's current posts as new posts (via realtime notification.. likely caused by a fanout)
While its accurate that all that feed's items are new to the follower, I'd like to stop the notification from appearing..Is it possible to disable the fanout notification when a feed follows another?
We don't currently have a way to suppress realtime notifications upon follow. The only way I think you could accomplish this would be for User A to follow User B without copying any old items, but then User A would only see new activities going forward.
I'll mention this to the team as a feature request.

What action should I use for a complex review?

I am thinking about adding actions to a transactional email that asks a customer to fill in a review and currently links to a web-app where a complex questionnaire with several questions and text fields is available.
The amount of data that is collected is far more than would be achievable with the in app review action. However the registration guidelines state that the most high-fidelity action available should be used, but it doesn't really allow for granular enough data input for my use-case.
Should I use a Go-to action? Or is there a way to use the in-app review action to collect part of the data and then redirect to a partially filled questionnaire to offer the option to answer the other questions?
I think you should use the Go-To action. These are for more complex interactions, when you need to provide a direct link to the page where the action can be performed. They are rendered in an email as a button in the subject line that redirects the user to the page specified in the action definition.
https://developers.google.com/gmail/markup/reference/go-to-action

How to grab instagram users based on a hashtag?

is there a way to grab instagram users based on a specific hashtag ?
I run contests based on re posting photos with specified hashtag then randomly pick a winner, i need a tool that can grab the usernames of those who reposted that photo and used that hashtag.
You can query instagram using the API. There are official clients for both python and ruby.
You didn't specify what language/platform you are using, so I'll give you the generic approach.
Query instagram using the Tag Recent Media endpoint.
In the response, you will receive a user object that has the user's username, id, profile url, and so on. This should be enough to do what you are describing.
As far as tools, there aren't great options to probably do things exactly how you want. If you just want a simple contest, you could use statigram, but it's not free.
If you roll your own solution, I highly recommend you also do the following:
Implement a rate limiting mechanism such as a task queue so you don't exceed your API calls (5000 per hour for most calls). Also useful for failures/network hicups, etc.
Have users authenticate so you can use OAuth to extend your API calls to 5000/per user/hour to get around #1.
Try the subscribe API if there won't be many items. You can subscribe to a specific tag as well, and you will get a change notification. At that point though you need to retrieve the actual media item(s), and this can cost a lot of API calls depending on how frequent and what volume these changes occur.
If your users don't have much photos/relatively small/known in advance, you can actually query the user's recent media instead and filter in your own code by hash tag.

Resources