问题
I've been stuck on this topic for awhile now, so any guidance would be appreciated.
Here's the setup: User A is following user B, but not user C. User B reshares a post from user C. The reshared post now shows up in user A's feed as the original post from user C and reshared by user B.
Really confused on what the structure of this looks like. I'm using Parse so it's safe to assume that I have the standard Users class and a Posts class.
回答1:
I would add a reference column to your Posts class that can hold a reference to another post. When user B re-shares the post you create a new entry in the Posts class that contains the reference to the original post but is listed as a post from B.
Now when you retrieve the posts that A is subscribed too, you will get the "repost" - you need to follow the reference to get the original content from C. If you allow re-posts of re-posts then you may need to repeat this de-referencing until you get to the original post.
来源:https://stackoverflow.com/questions/24603450/implement-a-retweet-reshare-functionality-using-parse