Talk:FBJS LocalProxy
From Facebook Developers Wiki
Is anyone else having problems using POST with localProxy enabled? Even using the example localProxy code, it appears that nothing is sent POST when localproxy is enabled. The requested page is:http://example.com/bar.php?query=[object%20Object]What is that Object? Disabling localProxy allows the POST to go through normally. Any thoughts on a fix? 893585135 11:36, 8 July 2008 (PDT)
Does it fallback to the proxy when the user doesn't have (the right) flash capabilities?
- +1 to this question, I'm curious as well.
- I used the following code to work with/without proxy :
function ajaxPost(ajax, post) {
ajax.useLocalProxy = true;
try {
ajax.post(url, post);
} catch(e) {
// most likely localproxy failed
ajax.useLocalProxy = false;
ajax.post(url, post);
}
}
- It fixes failure because flash isn't installed. For other cases, I guess you need to handle onerror 532974378 16:25, 27 March 2008 (PDT)
Wow its almost like i thought of this (http://wiki.developers.facebook.com/index.php/Talk:FBJS#Access_to_fbjs_fbml_string.28html.29) and got yelled at when i did ("unacceptable" to quote the response).. just had to "discuss" my frustration with the obvious two faced appearance here.
[edit] LocalProxy and login?
From what I found out when testing, it seems to be impossible to keep a session and use LocalProxy. I'd suggest to use a private session identifier, and check it (pass it via post), still it's far from what we would expect from a clean code :) Anyone did have to workaround that? 532974378 16:25, 27 March 2008 (PDT)
