Linkedin apply button plugin not logging in on IE8 - plugins

I asked this on the linkedin forum a few days ago, but no response there and nothing in a general web search, so trying here.
i I have an apply button test page at http://solomon.ie/li/ (HTML below also).
On IE8/WinXP if I hit apply, while not logged into my Linkedin account, I get the sign in screen/lightbox, hit Sign in button, get the login form popup, enter my details and the screen flashes. But, instead of getting my profile summary and confirm application , I am back to the the sign in screen/lightbox.
If I am already logged in and hit apply it works as normal. Works fine on IE9 and FF and Chrome.
I reset IE8 to default security settings and cleared cache/cookies. No error messages.
Thanks,
Kevin
--
<html>
<head>
<title> New Document </title>
</head>
<body>
<script src="http://platform.linkedin.com/in.js" type="text/javascript">
api_key: dhap7citpirm
</script>
<h1>solomon test job ie</h1>
<script type="IN/Apply" data-companyid="892056" data-jobId="Cj-222234"
data-jobtitle="Test job 4"
data-jobLocation="Dublin Ireland"
data-questions='[{"question": "Can you drive?"},{"question": "Do you have a SAFEPASS?"}]'
data-email="nospam#gmail.com"></script>
</body>
</html>

Related

Redirecting from htm

My client has an old website on freeserve.co.uk (dodgy and free, now belongs to Orange but no support). I want to redirect all pages on the old site to newdomain/index.php. The index page on the old site is index.htm, however most other pages are .html.
Whatever I try the 301 redirect doesn't seem to work. Has anyone come across freeserve before?
You want to redirect the user when they load the page, here are some examples.
Here's the main example
<head>
<script type="text/javascript">
<!--
window.location="http://www.newlocation.com";
//-->
</script>
</head>
but there are a few other options depending what behaviour you're after.

Facebook - Heroku - Tab Issues

having a problem using Facebook's Heroku Integration.
I've got a business page, which I want a "Facebok Tab" on, which links to a schedule.
From what I understand, I've had to setup a facebook app in the developer area, and setup the canvas's to point to my hosted files. which are located at https://warm-mist-9082.herokuapp.com/ my facebook namespace for the app is currently setup as https://apps.facebook.com/weblessoncrashes/.
Inside the app I've setup the Tab url as https://warm-mist-9082.herokuapp.com/lessons.php
So theoretically when I click my tab ( https://www.facebook.com/WebIsEasy/app_388846884472817 )
it should load the contents of lessons.php which is
<html>
<head>
<title>hihi</title>
</head>
<body>
nonono
</body>
</html>
however. What you in reality will see is just a facebook frame with a blank canvas within.
I have tried varying the tabs to use the facebook namespace, and checked all the SSL certs and entries are correct.
I've now come to a stand still.
Any help would be perfect!
Thanks

Facebook iFrame canvas app PHP sessions issue

I've been working on a problem for the last day and a half now and have still yet to find a solution.
When visitng my game on facebook (which is in facebook's iFrame) php sessions don't work. This is for IE and Safari. Chrome works fine.
I've already read all the posts on stack about this problem, which seems to be down to third party cookie security and needing interaction with the iFrame first. There was a workaround by making javascript post some form data to the iFrame first, but this seems to have been 'fixed' in the latest versions of the browsers very recently as this no longer works.
I even tried implementing a start page that would require them to click a link first (in the iFrame) to load another page which would then create the session. But even THAT doesn't work.
I'm also having trouble even loading new pages in the iFrame using javascript, which seems to always cause infinite loop refreshes.
And no, P3P headers do NOT solve it.
Does anyone have a solution to this problem? I can't be the only one with it, considering how many facebook apps exist!
I came across this problem using a client that had "Accept third party cookies" disabled. My solution was to force PHP to embed the session ID into the URI by putting this line at the start of each page:
ini_set('session.use_trans_sid', true);
As the URLs are in iframe within Facebook the SID is not seen in the top window.
For IE, you will need the P3P Headers set. Something like:
<?php header('P3P: CP="CAO PSA OUR"'); ?>
Safari blocks 3rd-party cookies by default. Currently, the only work-around that is working for me is to "pop-up" a new window to set the cookies. I have something like this:
<script type="text/javascript">
function safariFix(){
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1){
window.open('https://yourdomainname.com/safari.php', 'Safari Fix','width=100,height=100');
}
}
</script>
And safari.php will have this:
<?php
setcookie("safari_test", "1");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Safari Fix</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function(){
window.close();
});
</script>
<body>
Since Safari does not accept third-party cookies by default, we are forced to open this window.
This window will automatically close once we have set the cookies.
</body>
</html>
PROBLEM: This won't work if users have "block pop-ups" enabled in Safari. If anyone has a better solution for this, inform me ;)

Facebook Connect Access denied on line 22 all.js in IE7/8

I created a very, very simple login page using the exact code that is given in the introduction page of the facebook connect website. Every time I try to launch to connect through IE I get an error through javascript asking me if I want to debug a permission denied problem on line 22. Everything works fine in firefox, chrome, etc.
Odd thing is, the same exact error shows up in Hulu the other day when I tried to connect my Hulu account with FB Connect -- the javascript died on a permission denied problem on the same line. I have tried multiple machines (XP, 7 and Vista) and multiple IE browsers (IE7 and 8), same error.
Here is a copy of my code.
<html>
<head>
<title>My Facebook Login Page</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId:'XXXXXXXXXXX', cookie:true,
status:true, xfbml:true
});
</script>
<fb:login-button perms="email,user_checkins">
Login with Facebook
</fb:login-button>
</body>
</html>
This page can be viewed here: http://www.thecmmns.com/facebooktest2.html
Obviously the XXXXX thing is an actual ID on the live site.
Any ideas? I am very surprised I am the only one seeing this since it even happens on Hulu... Anyone else access Hulu or the above site and get access denied with IE7 or IE 8? Any ideas how to fix?
Just add this code before FB.init:
FB.UIServer.setLoadedNode = function (a, b){FB.UIServer._loadedNodes[a.id] = b; }
Read more at my blog.
Change
"https://connect.facebook.net/assets.php/en_US/sdk.js"
to
"https://connect.facebook.com/assets.php/en_US/sdk.js"
That will be ok.
It's weird that Facebook doesn't update their document.

How Do We Let Users Add Our Application As A Tab On Their Profile?

We currently have an iframe-based Facebook canvas application in the works. The canvas portion is working fine and doesn't really touch the Facebook API at all, since we don't really need any permissions from users in terms of accessing their social graph; the data we're using comes entirely from outside of Facebook.
What we would like to do is allow users to add an FBML version of our app to their profiles as a tab. However, it isn't clear how we are supposed to go about enabling that functionality using the current Facebook APIs.
The canvas page and callback settings are set up and working correctly, and we currently have a tab name and URL set up in our Application Settings (and hitting the tab URL directly will load our minimal test page), but there's no obvious way to offer users the ability to add this tab to their profiles.
Our initial thought was that we would need to add our own "Add Profile Tab" button in xfbml as mentioned at http://wiki.developers.facebook.com/index.php/Fb:add-profile-tab
But even when we reduce the iframe to something as barebones as
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>
<fb:add-profile-tab></fb:add-profile-tab>
<script type="text/javascript">
FB.init("<our secret key>", "xd_receiver.htm");
</script>
</body>
</html>
the xfbml element fails to render. Safari and Chrome both list the following error in the console: "Unsafe JavaScript attempt to access frame with URL [our app url on facebook] from frame with URL [URL our iframe loads from]. Domains, protocols and ports must match."
We do have the Connect URL pointing at our app in the Connect tab of the application settings page. The xd_receiver.htm file is located in the same directory as the iframe page and its contents are
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js" type="text/javascript"></script>
</body>
</html>
which seems to be what all of the relevant documentation recommends. The browser is definitely loading it as verified through the relevant debugging panes (web inspector, firebug, etc).
So the question is, is this the proper way of going about adding "add to profile tab" functionality to our application? If so, how do we resolve the cross-domain error? If not, what should we be doing instead? The current documentation seems to focus heavily on the Graph and Authentication APIs, neither of which really mention profile tabs.
In your Application settings, ensure these are set:
Canvas >
Canvas Page URL
Canvas Callback URL
Profiles >
Tab Name
Tab URL
The Tab request will go to {Canvas Callback URL}/{Tab URL}. Then something like this should work: http://apps.facebook.com/fbrelll/xfbml/fb:add-profile-tab
That's using the updated JS SDK. I can't post more links, but the developer site and github repository have useful information about the SDK.
It turned out that <fb:add-profile-tab> simply doesn't render without the user having first allowed the app to connect to them via something like <fb:login-button>