Facebook app iframe won't attempt to load when logged in as page - post

I have an app that shows up as an iframe on a Page. (Here's an example.)
If you view the app tab as a Facebook user, whether you have the app installed or not, everything works correctly.
If you view the app tab as a Facebook Page that has not installed the app, everything works correctly.
If you view the app tab as a Facebook Page that has installed the app, nothing displays. In fact, when sniffing the HTTP headers, it looks like no attempt is ever made to load the app URL.
Any idea what needs to happen on the Facebook side of the equation in order to have the tab at least make an attempt to load the app's page?
Thanks!

This is now a desired behavior, once you trying to visit Application Tab by being logged in as Page you'll be prompted to use Facebook as regular user:
To access this page, you'll need to switch from using Facebook as your page to using Facebook as yourself.
BTW, this was described in bug Blank app page which is marked as fixed (and the described behavior sadly was a way to fix this)...

Related

iPhone OAuth login request redirects to App not Browser, doesn't work

My current scenario is:
Running an iPhone on the latest iOS
LinkedIn App is installed and logged in
Web browser is NOT logged into LinkedIn (because I have the app)
Developing a web app with "log in with LinkedIn" functionality
On the iPhone, clicking the "log in with LinkedIn" button redirects me straight the the LinkedIn App, which subsequently does nothing - just shows me my feed. I have verified this same behaviour occurs on a third-party site as well as my own. Note that Android exhibits similar behaviour, though I haven't tested as extensively there.
I've found several workarounds:
If I open the web site in Private Browsing mode clicking the login button asks me if I want to open the App or stay in the browser.
If I long-press and "Open in background tab" the login button it'll open (in the background, of course) instead of redirecting to the app, allowing me to log in.
If I manually type "linkedin.com" into the browser and log in then it seems to work too.
None of these are even vaguely practical for end users, essentially forcing us to remove the option entirely.
I'm fairly sure this is a problem at LinkedIn's end and the solution is either:
Don't redirect to the App for OAuth Authorize requests, or
Make the App correctly handle OAuth Authorize requests.
If I'm incorrect and there's some way we can stop this redirect from the client side I'd be happy to hear, otherwise I hope LinkedIn engineers actually see this...
See the comments in Issues with Linkedin Social connection
LinkedIn already confirmed that it is a problem on their side.

Open iOS FB app with URL Schema

I am investigating ways to open the FB app using a URL Schema. I want to open my app directly to the Search Page and automatically fill the search bar. I am not seeing the search page covered in the URL Schemas:
URL Scheme to open a post in facebook app
Currently, my app is able to go to the search page by creating a custom hyperlink through code and launching Safari. However, most people are not logged into FB through Safari so this causes me issues.
Any thoughts?

Prevent LinkedIn from launching mobile app

I'm working on an iOS PhoneGap/Cordova app for a customer that launches a contact's LinkedIn profile page in an in-app browser. (Retrieved the URL from the people api) That part seems to work fine.
The problem is that once the page load, the user's LinkedIn app will launch, kicking the user out of my app.
Does anyone know of a way to prevent this from happening, aside from the user uninstalling their LinkedIn app?
If you are viewing an in-app browser, then you can instead of loading the page, retrieve the html for the page you want to view. Then, if possible, strip out the offending redirection (it might be javascript based) and display the modified HTML. At the end of the day, if you have access to the page that you are displaying, you should be able to find a way to strip out the offending stuff.
Now, if linked in changes their web page, you would probably need to update this code, but this way would work.

Facebook Canvas App Login URL doesn't look like other logins

So this is a canvas app, intended to run in the FB chrome.
I'm using the FB php SDK.
I'm creating my login url by:
$loginUrl = $facebook->getLoginUrl( array('scope'=>'email,publish_actions', 'redirect_uri'=>$fbCanvas));
then using this script to redirect:
print "<script> top.location.href='" . $loginUrl . "'</script>";
Instead of seeing a "regular" fb app auth dialog, such as:
What I want to see
I get a dialog like this one:
What I see instead
Any ideas what I'm doing wrong?
If the new user clicks on the Okay button, they are logged into the app, redirected correctly and everything works ok, I just want it to look like / work like every other app.
Thanks!
Facebook is re-styling the Login dialog (again), see https://developers.facebook.com/docs/concepts/login/permissions-login-dialog/#login-dialog
As usual with Facebook, this rollout does not affect all users or all apps at the same time, but is gradually rolled out. So for a while users might see both versions of the login dialog, but eventually all apps will use the new one.
You are doing nothing wrong.
I suspect Facebook has changed the way it displays the Authorization/Permission window depending on the data available for the Application. If your application lacks 'App Detail', 'Image' , 'Privacy Policy Link' etc. then you get the authorization window as What major apps show else you would get the window you are getting right now.
Earlier there was no distinction as such but since this month it might have changed as I earlier used to get the full fledged Authorization window but not now.

Not redirecting to Facebook comments in UIWebView after login

I am adding facebook comments to my iPad application using UIWebView and HTML5 code provided by Facebook.
When the user is not logged in, the application shows the comments and button "Login to Facebook to Post a Comment".
Clicking the button takes me through login process. After the login completes the view is redirected with an empty page with "Login complete" message. It is not redirected back to the comments dialog.
Right now I implemented an ugly workaround. Upon receiving webViewDidFinishLoad event, I look at contents of the page and reload it if the page shows this message. Though, it does not seem a clean way to go.
Why doesn't Facebook redirect me back to original comments page?
I suspect the problem you're having is related to this issue: Facebook authentication in a UIWebView does not redirect back to original page on my site asking for auth
Specifically, the standard Facebook web login process launches a new browser window dialog, and dispatches a message back to the opener to indicate login success for the redirect to occur.
Quoting a passage in the linked SO, "UIWebView doesn't support multiple windows so it can't postMessage back to your original page since it's no longer loaded."
I'm also developing an iPad application, and my solution is similar to yours: i drive the user to "https://m.facebook.com", always, to force him to login first, then in "webViewDidFinishLoad" i inspect the returned url and if it matches:
"https://m.facebook.com/login/checkpoint/"
exactly, that is, the url returned upon a successful login, then i call my own method (with reload or anything i want). At this time, the user is authenticated and has a valid FB session, so, redirections are not necessary anymore.
It's definitely not pretty, and may break as soon as FB changes the way it processes the login dialog, but i too cannot find a way to resolve it any better. Even tried using "FB.Event.subscribe('auth.login', function(response) {});" without success, of course, because the code is never reached.
I think a bug is already submitted to FB, but i don't think it's getting the deserved attention...
I ran into same issue as this question, but after reading some Facebook official documentation, I'll be redesigning to use the Facebook native SDK.
All iOS and Android apps must (effective October 2, 2013) use our SDKs
for iOS and Android for requesting permissions.
Though, I also gather that the "or else" is just a "developer notification"?
Posting this in hopes it will save time for someone using the same approach :)

Resources