Skip to content

Latest commit

 

History

History
executable file
·
52 lines (38 loc) · 2.13 KB

README.md

File metadata and controls

executable file
·
52 lines (38 loc) · 2.13 KB

IADisquser

A simple iOS wrapper for [Disqus API v3.0] (http://disqus.com/api/docs/)

Ever wanted to view your Disqus' comments from your site to your iOS app? Prefer a native way than javascript-embedding? Drag it to your project and implement it without a hassle!

With IADisquser, your iOS app can view and post comments with a couple of single method. Block-based callbacks make implementing disqus in your app fast & easy.

If you want to check IADisquser in action, please use the sample project, then you can see & post your comments from the app, or on my [blogpost] (http://toogeekforpunk.com/2011/10/iadisquser-disqus-api-wrapper-for-ios/).

Example

View Comments

// Method for getting comments from a Disqus Thread
// Identifier & thread ID : http://docs.disqus.com/help/14/
[IADisquser getCommentsFromThreadIdentifier:@"Identifier" 
                                    success:^(NSArray *comments) {
                                        for (IADisqusComment *aComment in comments)
                                            NSLog(@"Raw comments from %@ : %@", aComment.authorName, aComment.rawMessage);
                                     } fail:nil];

Posting a Comment

// Method for getting comments from a Disqus Thread
// Identifier & thread ID : http://docs.disqus.com/help/14/
IADisqusComment *aComment = [[[IADisqusComment alloc] init] autorelease];
aComment.authorName = @"Ikhsan Assaat";
aComment.authorEmail = @"ixnixnixn@yahoo.com";
aComment.rawMessage = @"Nice to meet you!";
aComment.threadID = [NSNumber numberWithInteger:2000];
[IADisquser postComment:aComment success:^{NSLog(@"Comment posted.")} fail:nil];

Dependencies

License

IADisquser is available under the MIT License.

Credits

IADisquser was created by Ikhsan Assaat in the development of Beetlebox's Sajian Sedap iPad app.