- You must host the page containing Disqus on an externally-accessible server. This is because Disqus embed requires a valid referrer to load
- The platform's inline browser engine must be compatible with Disqus. See mobile browsers we support
- You must set the disqus_url, disqus_identifier, and disqus_title to be the same as the original article page in order to properly sync the comments
- The "community" tab gets hidden when the parent container reaches 480 pixels in width, so is not available when rendering on mobile devices
- At maximum reply depth, the comment may appear very narrow
- Links in comments will lead to other websites in the inline browser, so providing a way back to the original thread is recommended
1. Host a static Disqus page
2. Pass variables to the page
Now you can pass variables to the page in order to load the proper thread. We've set the example up to read querystring paramaters. Specifically pass 'shortname=your_disqus_shortname', 'url=your_post_url', 'title=your_page_title', and/or 'identifier=your_custom_identifier' (if you use one). These variables will be used to look up the thread, but you'll want to be careful to stay consistent with your live site. If the URL and/or identifier aren't consistent with the regular article page, you may end up with duplicate discussions for the same piece of content.
3. Disable the mobile theme
The new Disqus mobile theme isn't yet optimized for native apps, but the regular embed will still work. To disable the mobile theme, add this configuration variable below disqus_shortname:
var disqus_disable_mobile = true;
4. Handle logins
You will probably see that this works properly after step 2. However, if you attempt to log in to comment you'll notice that the page gets stuck on the loader after successfully logging in. At this point, the user is considered logged into Disqus and you just need to take them back to the original comment thread.
- In your native code, listen for changes in the URL.
- When the user navigates to:
https://disqus.com/next/login/?forum=YOUR_SHORTNAMEMake sure you provide a method to go back to the embed in case the user doesn't want to log in anymore.
- Then listen when the user naviages to
disqus.com/_ax/[twitter, google, facebook]/completeAt that point the user is logged in, so navigate them back to the original discussion thread so they can comment. See example below for how this would look in a C# Windows Phone application: