Blank popup with FB connect - facebook

I've implemented the facebook connect using Javascript SDK. The authentication works fine when the user I'm trying to authenticate is not logged into facebook. But when he's already logged into facebook the login popup never closes. The url of the popup starts with "http://static.ak.fbcdn.net/connect/xd_proxy.php#cb=....."
This happens both on Firefox 3.5 and on Chrome.
Any suggestions? Do I need to set any extra parameters while connecting to Facebook?

I've encountered the same error today, with my year old implementation. I've added the channelUrl tag to FB.Init(), without any luck; so I started the login procedure from scratch with the js sdk, oauth2 enabled: with some minor changes, everything started to work misteriously again. I've run my pages through the Facebook debug tool as well, it suggested some changes as well.
To sum up: basically, if Facebook Connect stops working, upgrade your code according to the latest documentation avaliable.

No special parameters are needed. This is probably a browser problem. Maybe you have a setting/plugin somewhere that does not allow Javascript to close a window for you.
The easiest way to test this is to post a link to your implementation so that other people (with other browser setups) can give it a try.

Related

Facebook test app stopped working, production app works fine (using JS SDK)

I have a FB app that my website uses for the FB Login button. This app has been public for some time, and works great in production. I created a test app for my dev environments, and this too has been working fine until last week, when I suddenly started seeing this message in the browser console:
Application Error: There was a problem getting data for the application you requested. The application may not be valid, or there may be a temporary glitch. Please try again later.
This happens after I call FB.init() -- a call to FB.getLoginStatus() triggers this error, and the callback passed to FB.getLoginStatus() is never invoked. Again, this only happens in my development environments, not production, although the XFBML button still triggers a popup.
I copied the basic SDK code from FB's documentation, placed it in its own page, and still have this problem, so it is not something on my website's pages that is interfering.
I've tried searching SO/Google for answers, but the only real information I get is from back in 2011/12/13 and involved FB apps being in development mode; mine is not, it is public. I've tried creating a new test app and changing the FB ID that my website uses, but I get the same result.
The only change to (all) of my environments made recently is that they're all using SSL by default. Could this possibly be the cause? And if so, why would it work in my production environment but not in my development environments? Any insight is much appreciated.
EDIT: Using SDK v2.4, if that matters.
EDIT 2: This only seems to happen if the user is not logged into FB at all. If they have logged in externally, the SDK seems to recognize that and the call to FB.getLoginStatus() works fine.
Looks like it's a Facebook bug: https://developers.facebook.com/bugs/252572561775079/
Check that your Facebook app is "live and available to all users" and not in development mode, otherwise you'll get this error.
Go to https://developers.facebook.com/apps/ > open your app > App Review > "Make [App Name] public?" > YES

facebook login oauth and osx 10.11/CNA

a little background:
I have an hotspot page wich integrate with facebook login oatuh. The app runs on facebook api v.2.4 and uses node/express/passport to handle the login process
The only option i pass to the oauth fb page is display: touch, so the login page works fine without cookie support
the issue:
since a few days , only on osx 10.11/cna the login can't be processed because of no cookie support in CNA (this should mean that fb ignores the display option, in this case only)
the same request made from a ios device from within the cna works fine
I've already confirmed the display option is actually send, so my best guess is that fb started overwriting/ignoring this option. Also I can't find any reference in the fb api docs anymore (except for display=popup in the manual login page)
Any hint about this ?
thanks
g
Not sure if you still have this issue, but I can confirm facebook login definitely works end to end inside the CNA on 10.11. The CNA does allow cookies, what it doesn't allow is access to existing cookies in safari or access to localStorage and sessionStorage.
If you have your FB sdk configured with cookies=false, this may well be your issue. When set to false I believe the sdk is then attempting to use local storage.
The other thing to check would be what you have in the walled garden list. We have just got to the bottom of this issue after a lot of frustration. Allowing certain CDN networks actually causes iOS to complete it's internet check and no longer think it's behind a captive portal. I added an answer here https://stackoverflow.com/a/41273984/4427589.
As I said, I can confirm it definitely works end to end inside the popup.
Cheers
Paul

What's the correct way to authorize PhoneGap application to the Facebook?

I spent a while already to fix annoying issue with Facebook in PhoneGap app. And still a lot of things goes wrong with that. The thing is that I use Appery.io and Facebook plugin.
This is how my Facebook console looks now:
I suggest that localhost might be a reason of the issue. However, I got it into Facebook_Helper.js:
Everytime I try to sign in with FB account, I get the same error at the child window:
So what I've got is that app is authorized at this moment indeed, because there's a menu button at the navbar that allows me to navigate through FB profile:
The first issue lies in that the child window never gets closed automatically once user submitted Sign In form. And the second one is that I can't get the access token to the app directly. I know I'm doing something wrong, but I spend more than a week on that and nothing was clarified.
Honestly, I've no idea why it's not working. I saw a lot of apps written in PhoneGap that use the same authorization too, and they work as it should. Will be appreciate if you take a look into that and, maybe, advice something.
First, I don't see iOS or Android in your developer.facebook screenshot.
Second, you should implement native facebook integration if you are developing an app, if I understand correctly from your code, you are trying to handle only web browser version of authentication. Native integration is both the suggested way by facebook and platforms and better experience for end users. If users have facebook app installed, authenticating over fb app is more secure after all..
You can use a cordova plugin for facebook integration, here is one of the plugins (I am one of the authors): cordova-facebook plugin

When I use the facebook javascript SDK for authentication it fails on mobile phones and ipad

Javascript authentication works great on browsers but once I use the website on mobile, I always get this error on the login popup.
Sorry, the application you are using is misconfigured for Facebook integration. Please download the newest version of the application.
Instead of showing the usual login popup, it goes to m.facebook.com and it produces this error. Whats interesting is clicking on the spanish link, makes it work again.
--EDIT--
After doing some research and tinkering, ive nailed it down to this:
<fb:login-button registration-url="http://www.example.com/page#register" onlogin="authenticate.facebookLoginCallBack()"></fb:login-button>
Its possible the pound sign blows it up. I need the pound sign because i dont want to redirect off the page,instead i want to trigger a js registration popup.
My guess is that the # gets into the redirect-url, and then must somehow get transformed again on its way to getting redirect to m.facebook.com and that makes it fail there.
--EDIT--
I thought about redoing the flow by creating my own button and calling FB.login, but there is no way to tell the API to stop at login, and load my own registration. The problem is summed up here Registration flow using FB.login
Realistically it seems we are only provided with one option here:
https://developers.facebook.com/docs/plugins/registration/
Login + Registration Flows
and it doesnt work in my situtation
VISUALS
Typically the user clicks on this button
Then they see this dialog. (Notice it says www.facebook.com in the url)
But they see this dialog on mobile. (This is loading from m.facebook.com)

Facebook Application Error: https://www.facebook.com/4oh4.php

I am new in developing my facebook application. I know php, HTML. I have a application in my server: http://www.example.com/app_name
with only one file written in php i,e index.php
I filled all the requisite as instructed by facebook documentation for canvas URL and all. Now when i am trying to access this http://apps.facebook.com/app_name
I get this error: The Page you requested was not found.
https://www.facebook.com/4oh4.php
Can anyone please help me????
There is a currently open bug report in Facebook's bug tracker about this issue: https://developers.facebook.com/bugs/325223977546904
It could take a while for your app to propagate to all FB servers so you may just have to wait a little. Are you logged in as the administrator to the app? If you have it set to private then you will be redirected to the 404 page if you are not an admin or tester.
I had the same issue which seemed to be transitory. About ten minutes later the site started working again. Facebook.... Sigh.