Skip to content

Instantly share code, notes, and snippets.

@anfedorov
Last active December 15, 2015 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anfedorov/5183098 to your computer and use it in GitHub Desktop.
Save anfedorov/5183098 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta name="referrer" content="never">
</head>
<body>
<script language="JavaScript">
<!--
// This will resize the window when it is opened or
// refresh/reload is clicked to a width and height of 500 x 500
// with is placed first, height is placed second
window.resizeTo(499,9)
-->
</script>
</div>
<script>
var url = "https:\/\/www.facebook.com\/dialog\/oauth?type=user_agent&scope=email%2Cpublish_actions&2Cpublish_stream&client_id=139682082719810&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html%3F-Your+Special+Token-&sso_key=com.jango.jango&sdk=ios&display=popup";
url = encodeURIComponent(url);
var iframe = document.createElement("iframe");
iframe.style.display = "none";
iframe.src = "javascript:0;";
iframe.onload = function(){
var doc = iframe.contentDocument ? iframe.contentDocument : (iframe.contentWindow.document || iframe.document);
doc.body.innerHTML = "<meta name=\"referrer\" content=\"never\">\n<form target=\"_parent\" action=\"https:\/\/www.facebook.com\/dialog\/oauth?type=user_agent&amp;scope=email%2Cpublish_actions&amp;2Cpublish_stream&amp;client_id=139682082719810&amp;redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html%3F-Your+Special+Token-&amp;sso_key=com.jango.jango&amp;sdk=ios&amp;display=popup\" accept-charset=\"utf-8\">\n\t \n\t\t<input type=\"hidden\" name=\"type\" value=\"user_agent\" \/>\n\t \n\t\t<input type=\"hidden\" name=\"scope\" value=\"email,publish_actions\" \/>\n\t \n\t\t<input type=\"hidden\" name=\"2Cpublish_stream\" value=\"\" \/>\n\t \n\t\t<input type=\"hidden\" name=\"client_id\" value=\"139682082719810\" \/>\n\t \n\t\t<input type=\"hidden\" name=\"redirect_uri\" value=\"https:\/\/www.facebook.com\/connect\/login_success.html?-Your Special Token-\" \/>\n\t \n\t\t<input type=\"hidden\" name=\"sso_key\" value=\"com.jango.jango\" \/>\n\t \n\t\t<input type=\"hidden\" name=\"sdk\" value=\"ios\" \/>\n\t \n\t\t<input type=\"hidden\" name=\"display\" value=\"popup\" \/>\n\t<\/form>\n";
/* ==
<meta name="referrer" content="never">
<form target="_parent" action="https://www.facebook.com/dialog/oauth?type=user_agent&amp;scope=email%2Cpub…r+Special+Token-&amp;sso_key=com.jango.jango&amp;sdk=ios&amp;display=popup" accept-charset="utf-8">
<input type="hidden" name="type" value="user_agent" />
<input type="hidden" name="scope" value="email,publish_actions" />
<input type="hidden" name="2Cpublish_stream" value="" />
<input type="hidden" name="client_id" value="139682082719810" />
<input type="hidden" name="redirect_uri" value="https://www.facebook.com/connect/login_success.html?-Your Special Token-" />
<input type="hidden" name="sso_key" value="com.jango.jango" />
<input type="hidden" name="sdk" value="ios" />
<input type="hidden" name="display" value="popup" />
</form>
*/
doc.forms[0].submit();
}
document.body.appendChild(iframe);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment