سؤال

I'm creating a Rails app for use with Reddit's API.

How can I go about telling if a logged in user has voted on a link before? And which direction did they vote?

هل كانت مفيدة؟

المحلول

I found that if a user is logged in, in the JSON of a listing item there is a variable likes

likes is true for an upvote, false for a downvote and null for no vote.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top