Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disqus 3rd Party Login Broken in iOS UIWebView

I am trying to use Disqus for comments in a native iOS app by loading a web page with the Disqus javascript code into a UIWebView. I am following the guidelines here: http://help.disqus.com/customer/portal/articles/472096-javacript-embed-in-native-apps

When a user click on a 3rd party login, for example Facebook, they are brought to that site then to http://disqus.com/_ax/facebook/complete/...

At this point I stay on that page for a second, then load my original comment page as the documentation suggests.

When the comments page is reloaded, the user is still logged out.

How do I get the user to log in?

Here is an example page that I am loading into the UIWebView: http://www.tomsapps.com/walking-tour/comments.php?shortid=1&placeid=1

The login works on this page in desktop browsers and iOS Safari, but not in the UIWebView.

like image 586
Tom Kincaid Avatar asked Oct 21 '22 02:10

Tom Kincaid


2 Answers

Here is a good one that solves the authorization issue and provides a seamless flow to display and respond to comments.

Hope it helps https://github.com/moqod/disqus-ios

like image 200
Slava Todavchich Avatar answered Oct 30 '22 17:10

Slava Todavchich


Figured out that for new accounts, it was going to disqus.com/_ax/facebook/complete then immediately after that to disqus.com/next/register, thus never giving new accounts a change to finish registering. This is not in the Disqus docs.

like image 41
Tom Kincaid Avatar answered Oct 30 '22 19:10

Tom Kincaid