How do you use the reddit API to get the title/upvotes/op of a post using IOS? Is it even possible or do I have to parse the HTML? I have already parsed the front page but the posts I get don't match the desktop version at all. I feel there must be an easier way to access this information.

有帮助吗?

解决方案

You sort of answered this yourself. Use the Reddit API, request the information you want and parse the JSON that's returned from the API. Specific community support found here but be sure to try and solve your problems by searching first.

You'll find a wealth of information on parsing JSON on StackOverflow, including examples specific to your language.

You can easily get the front page JSON by requesting: http://reddit.com/.json to start with.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top