Logout seems to be very buggy in Firefox and IE - facebook

In Chrome and Safari it works beautifully, right when you click on the button it logs out every time.
However with FF and IE you click it on it and it just keeps on refreshing trying to load things from facebook but never goes into the logout callback. If you do it like 20 times it will finally log you out and allow you to login again. It is not consistent at all. This was all working fine some days ago, didn't change anything but now it is busted.
No Javascript Errors. Here is my log out code.
FB.getLoginStatus(function(response)
{
alert("inResponse");
if(response.status == 'connected')
{
alert("inConnected");
FB.logout(function(response){
alert("inLogout");
window.location="./logout.php";
});
}
........
inReponse is printing, inConnected is printing, inLogout never gets successfully called... This is very frustrating, any idea what could be wrong? Thanks

Looking i'm not sure ether but i think you might be missing a few closing brackets
FB.getLoginStatus(function(response))
{
alert("inResponse");
if(response.status == 'connected')
{
alert("inConnected");
FB.logout(function(response)){
alert("inLogout");
window.location="./logout.php";
});
}
Might be helpfull

Related

Running the google places modal popup in flutter

Looking at the flutter code it seems like I should be able to run the google places modal dialog since it does a full screen thing and doesn't try and overlay on top of flutter.
However I am having an issue where the modal shows up and then disappears again immediately. I am not entirely sure how to solve this...
I am activating it with:
call.method == "openPlacesDialogModal" -> {
val code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(activity)
if (GoogleApiAvailability.getInstance().showErrorDialogFragment(activity, code, REQUEST_GOOGLE_PLAY_SERVICES)) {
return
}
//val intent = Intent(activity, PlacesActivity::class.java)
//activity.startActivity(intent)
var intentBuilder = PlacePicker.IntentBuilder()
activity.startActivityForResult(intentBuilder.build(activity), PLACE_PICKER_REQUEST)
placeResult = result
return
}
In the logs I get:
I/FlutterActivityDelegate(18184): onResume setting current activity to this
I/flutter (18184): Opening picker
I/FlutterActivityDelegate(18184): onResume setting current activity to this
I think it is the onResume getting back to the ActivityDelegate that is the issue.
I put this on top of a completely different activity too, which kind of works. It shows the dialog for longer. I made sure I have all the right permissions, I have the fine location, internet permissions. Do I need to setup anything else?
Thanks,
David.
Error here was that I was not setting up the google api correctly and it was erroring immediately. Had to put in some checks to look for this error so I could respond correctly to the app that an error occurred.

Facebook Canvas setAutoGrow grows forever in IE

I am seeing a weird issue in Internet Explorer 9 on my Facebook pagetab when I have setAutoGrow to true. The height grows continuously without end. This is only happening in Internet Explorer for me. Tested with Chrome and Firefox as well.
An example can be found at https://www.facebook.com/GunSweeps/app_480125662005248
Any ideas on what could be the cause? I read another thread on here that suggested it was html, body being set to 100%, and another which said a top-margin was the cause. I'm tried both of these remedies to no avail.
Edit: In more searching, I saw that a global variable might have been the issue, but went through and that does not appear to be the cause either.
Thanks ahead of time for any ideas.
May be you can Try
FB.Canvas.setSize();
After all your contents load
or use a simple timer
var resizetimer= window.setTimeout(function() {
FB.Canvas.setSize();
}, 4000);

PhoneGap Events Not Firing On iPhone

I've started developing for iPhone using PhoneGap and an iPhone running iOS 5. With the following code, the deviceready and online events appear to fire when the application starts but none of the others, in particular, the resume / pause events appear to. I've tried using the menu button to close the app and then re-open it but nothing appears to fire the resume event.
If anyone could shed any light on this it would be much appreciated.
Thanks in advance!
window.addEventListener('load', function () {
document.addEventListener('deviceready', onDeviceReady, false);
}, false);
function onDeviceReady() {
document.addEventListener('resume', onResume, false);
document.addEventListener('pause', onPause, false);
document.addEventListener('online', onOnline, false);
document.addEventListener('offline', onOffline, false);
}
function onResume() {
alert('resume');
}
function onPause() {
alert('pause');
}
function onOnline() {
alert('online');
}
function onOffline() {
alert('offline');
}
For me this was an ID10-T error: my PhoneGap app was redirecting to a URL which I had changed in one place but not in the other. The result was it looked like I was running my development code but I was actually running against a remote server running code without onResume and onPause events!
BTW, documentation for these events can be found at http://docs.phonegap.com/en/1.4.1/phonegap_events_events.md.html

fbAsyncInit is not Firing

See this Page Tab (its only a test page, just fan it :-)
http://www.facebook.com/pages/Ludwig-Test/127771653944246?sk=app_165323306883725
its working in FF. But not in IE.
You should see 2 Alert boxes, one from fbAsyncInit and one from getLoginStatus. in IE neither ist coming. but now to the funny part. Press F12 to open the DeveloperTools from IE. and click on "iPad Gewinnspiel" again. now its working.
Right klick on the icon of "iPad Gewinnspiel" to open the page in a new tab. -> not working. again with F12 and it will work.
Does anyone have any idea what i could do to fix this ?
TIA
You need to initialise the FB object inside the async function
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_ID',
status : true,
cookie : true,
xfbml : true,
oauth: true
});
// Do stuff with FB object here
}
I should really not use console.log in the code when i want to test IE.....
as soon as this for IE unknown commands are out of the code is working as expected.
Funny enough when the developer console is open this function exists and are working. stupid IE developer who thought of such nonsense.
see What happened to console.log in IE8? for more information.

Take multiple pictures using Titanium/Appcelerator on iPhone

I am working on a small iPhone app using Titanium/Appcelerator. Now what I am trying to do is the following:
Open the camera to take a picture
Ask the user if he wants to add another picture (OptionDialog)
Open the camera again
{loop here}
Put the images (saved locally) into an array
I tried putting a OptionDialog into the success event of the camera, but it didn't work as expected.
maybe something like that.
dialog.addEventListener('click',function(e){
switch (e.index){
case 1:
takeAPicture();
case default:
...
};
});
function takeAPicture(){
Titanium.Media.showCamera({
success: function(evtSuccess) {
dialog.show();
},
...
});
};
Titanium.Media.takePicture();
what happened putting it into the success event? what exactly did you put into? i would put the
dialog.show();
into the success event too