Facebook Connect in WebView Failing

by Randall » Fri, 16 Apr 2010 08:34:38 GMT


Sponsored Links
 My site's Facebook Connect login scheme does not work when I load my
site in a WebView.  However, everything works fine when loaded in the
emulator's browser.  Other sites' Facebook Connect logins are also
failing in a WebView so I don't think it's an issue with my site's
login code.  I hope I am just missing a WebView setting, but I cannot
figure out what I need to do to get this to work. I am using a WebView
with setJavaScriptEnabled(true).

Here are some additional details:
- the facebook connect button renders properly in the WebView
- facebook login dialog pops up when this button is clicked
- after filling submitting the user's credentials, I can see that the
WebView tries to load a URL that looks something like "http://
mywebsite/xd_receiver.htm?....."
- The WebView is blank even though the URL loads without any errors


Thanks for the help

--



Facebook Connect in WebView Failing

by Lance Nanek » Sat, 24 Apr 2010 21:11:51 GMT


 I ran into a lot of trouble using FaceBook in WebView as well. I don't
recall the specifics exactly, but it was countless issues like:
hitting a post or login button before the page fully loaded resulted
in a JavaScript error that then kept the page from working even when
it did finally load, FaceBook trying to run JavaScript by just sending
a script element that wasn't in a full page, and other fun stuff. I
think they tried to do a redirect that way once too, which might be
what you are running into. Check the actual contents of what they are
sending, often it is a nightmare and you won't have to wonder why it
isn't working by default. Some pages accept a display parameter that
can be set to wap or touch, options like that, that make what they
send slightly less disastrous.



>


Sponsored Links


Facebook Connect in WebView Failing

by mike » Tue, 27 Apr 2010 08:36:09 GMT


 I can say that if you were using the normal require_login() php call
(or whatever server-side language your app is written in) in a facebook
callback app, it was broken for about a month and a half on mobile
browsers (iphone, android...) taking you to their mobile version of
facebook rather than honoring the next parameter. This was fixed about
a week or so ago, so if you haven't retested give it a try again.

Now if you're talking about the javascript based facebook connect
stuff having problems, that's a different problem.

Mike



I ran into a lot of trouble using FaceBook in WebView as well. I don't recall the specifics exactly, but it was countless issues like: hitting a post or login button before the page fully loaded resulted in a JavaScript error that then kept the page from working even when it did finally load, FaceBook trying to run JavaScript by just sending a script element that wasn't in a full page, and other fun stuff. I think they tried to do a redirect that way once too, which might be what you are running into. Check the actual contents of what they are sending, often it is a nightmare and you won't have to wonder why it isn't working by default. Some pages accept a display parameter that can be set to wap or touch, options like that, that make what they send slightly less disastrous.
My site's Facebook Connect login scheme does not work when I load my site in a WebView. However, everything works fine when loaded in the emulator's browser. Other sites' Facebook Connect logins are also failing in a WebView so I don't think it's an issue with my site's login code. I hope I am just missing a WebView setting, but I cannot figure out what I need to do to get this to work. I am using a WebView with setJavaScriptEnabled(true). Here are some additional details: - the facebook connect button renders properly in the WebView - facebook login dialog pops up when this button is clicked - after filling submitting the user's credentials, I can see that the WebView tries to load a URL that looks something like "http:// mywebsite/xd_receiver.htm?....." - The WebView is blank even though the URL loads without any errors Thanks for the help --