-2

I am working on a Xamarin.Forms PCL social media app project. People can like posts and comment on them which is saved in MySQL. I would like to add an activity page.

What is the best way to calculate users activity, I don't think UNION will work since the comments table has a different structure than the likes table.

I was considering creating an activity table which would be "userid|message|timestamp" then just grab all those but that doesn't seem very efficient.

Also how do I prevent spam of notifications if a user likes/unlikes a picture multiple times to spam another user?

1 Answer 1

0

to prevent spam i would recommend like/dislike functionality must be for signed user and based on that allow just once. And even you can detect and block the user if needed. but be careful that notifying the user every time when there is like and unlike. talking about users activity making activity table is a good option for every activity user makes it will be recorded in activity table and you can view it as a report.

2
  • For the activity table wouldn't it overload with all the users liking posts, commenting, and following each other? Commented Mar 15, 2018 at 1:52
  • you can make multiple activity table as you needed and join when you show the report if it is. Commented Mar 16, 2018 at 12:21

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.