Created
November 7, 2011 02:05
-
-
Save reinbach/1344029 to your computer and use it in GitHub Desktop.
view vgc prompt template snippets for facebook interaction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if facebook_apikey %} | |
<script src="https://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
FB.init({ | |
apiKey: "{{ facebook_apikey }}", | |
status: true, | |
cookie: true, | |
xfbml: true | |
}); | |
FB.Event.subscribe("auth.sessionChange", handleSessionResponse); | |
// handle a session response from any of the auth related calls | |
function handleSessionResponse(response) { | |
if (response.session) { | |
// if we dont have a session, just hide the user info | |
window.location.reload(); | |
return; | |
} | |
} | |
</script> | |
{% endif %} | |
{% if facebook_apikey %} | |
<div id="fb-root"></div> | |
<p>You need to be logged in to Facebook to retrieve your {% egc_display_label %}. If you are already logged in you will be redirected to your {% egc_display_label %} shortly.</p> | |
<br /> | |
<div style="text-align:center; margin:10px 0 0;"> | |
<fb:login-button></fb:login-button> | |
</div> | |
<!--[if !gt IE 7]> | |
<div style="margin-top: 30px"> | |
<span style="color:red;"> <strong> You may want to upgrade your browser.</strong></span><br /> | |
You are using an old version of Internet Explorer to browse Facebook right now. Facebook will work better for you if you upgrade or switch to another browser.<br> | |
<br> | |
<a href="http://www.microsoft.com/windows/internet-explorer/default.aspx" target="_blank">Upgrade to Internet Explorer 8</a><br> | |
<a href="http://www.firefox.com/" target="_blank" rel="nofollow">Switch to Firefox</a><br> | |
<a href="http://www.apple.com/safari/" target="_blank" >Switch to Safari</a><br> | |
<a href="http://www.google.com/chrome" target="_blank">Switch to Google Chrome</a> | |
</div> | |
<![endif]--> | |
{% else %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment