12. Category Limitations
• Categories may only be created using the API.
• Moderation may not be performed on posts by
Category, only by Forum and Thread.
13. Disqus API
threads/create
threads/list
posts/create
posts/list
posts/report
Full documentation is available at http://disqus.com/api
14. Registering Your App
https://disqus.com/api/applications
/register/
1. Specify Domains
2. Set Permissions
Read
Read and Write
Read, Write, and Manage
3. Save Tokens
Access Token
API Key
API Secret
15. Create a Forum
https://disqus.com/admin/create/
1. Name your site
2. Specify a unique domain
Creating an application does not
implicitly create a forum!
16. Posting to Disqus
As a user
Authenticate via OAuth
As a guest
1. Enable “Allow guests to comment” (Settings > General)
2. Application domain must be set correctly
3. Use the magic API key:
E8Uh5l5fHZ6gD8U3KycjAIAk46f68Zw7
C6eW8WSjZvCLXebZ7p0r1yrYDrLilk2F
30. Caching Health Status
• If health status expires, everything just fails over
• Adjust the health status expiration to back off:
• FAIL 1: expiration=2 minutes
• FAIL 2: expiration=4 minutes
• FAIL 3: expiration=8 minutes
• …etc
Disqus normally plays second fiddle to your site content.
Blog comments, e-commerce site comments
Donnell Leahy and Natalie MacMaster
(You’ll never be good enough to play second to either one of these guys)
What if Disqus was your primary database?
We did this very thing at Brandmovers last year…
Microsite
Several categories of idea submissions
Zero tolerance for objectionable content
Perfect for DISQUS!
Disqus nowhere to be seen
Guest posting
Disqus Taxonomy:
Forum = site consisting of Threads, and Posts
Thread = collection of Posts in a tree-like structure (“discussion”), unique slug, may be assigned to categories
Post = a single post within a Thread
Go to disqus.com/api
Use OAuth if acting on behalf of another Disqus, user
Use pre-gen access token if acting on own behalf, doesn’t expire(?)
“Unique domain” = form ID
Enable guest posting in the control panel for your forum, not the API application settings.
Use your own api_secret, and this magic api_key.
Sweet! So we go build this cool new application with Disqus as our primary database.
In case you’re wondering, this is a cruise missile powered 1967 Chevy
Paul Stender, rocket-powered car urban legend
Disqus breaks, will it break your site?
Whoever said “[read quote]” wasn’t a computer programmer, because this is what happens when things go right:
Your client’s website makes it to the front page of Reddit
Or it’s featured on Undercover Boss
Lack of control, Network latency, API rate limits
That was easy…
Disqus isn’t playing second fiddle
Must keep the cache expiration really short or cache will be too stale
Expires too soon: lose redundancy
Expires too late: lose viewers
New post submitted
Moderator actions (approve, delete)
Fetch resource from burst cache
Cache fail: fetch resource from Disqus
Write resource to burst and failover caches
Fetch resource from burst cache
Cache fail: fetch resource from Disqus
Disqus fail: fetch resource from failover cache
Backend process periodically pings Disqus and records health status in burst cache
Fetch resource from burst cache
Cache fail: fetch health status from burst cache
Heartbeat fail: fetch resource from failover cache
Wrangle with caching
vs
Build moderation + spam checking + blacklisting + scaling issues
But don’t worry…