Is there a Disqus API to use with iOS? We're aiming to develop an app for a website which uses disqus as comment service, and we're trying to use it with the mobile app.
I've seen Rade | Eccles way (http://appworks.radeeccles.com/programming/disqus-api-objective-c/) but we're still looking for alternative methods.
Injecting the disqus universal code (javascript) manually and loading it within the webviews seems not to work. Disqus maybe checks if the URL is real or not, and the frame keeps loading but never shows up.
One way would be to load a webview requesting the real site, and show only the disqus commentbox. Is there a way to achieve this in cocoa touch? Surely with javascript is possible, but are you able to determine with cocoa which frames are visible within a uiwebview?
Any other suggestions?
Well, this questions was more about recommendations on how to do it, rather than coding it. Hope it doesn't mind.
Thanks in advance,
What I did is to make a simple wrapper that calls Disqus APIs. I used AFNetworking a lot lately, so I use a quite similar approach using block-based callbacks. But currently, I use it only for viewing comments and post a comment.
I made a custom disqus comment object for that 2 features. After the request with the required parameter for viewing comments is fired, the callback is simply to parse every single of them to my custom object. Throw it all to an array and send them as a NSArray through blocks. For posting a comment, I allocate the custom object with required parameters, and send them all to Disqus. There's a delay for a couple seconds though, before the comment is received.
If you want to check out my approach on this, here's the link : Disquser.
Here is a great solution which helps easily integrate Disqus into iOS apps https://github.com/moqod/disqus-ios. Works like a charm out of the box.
This allows almost all social features for Disqus like authorization, commenting and responding to comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With