Skip to content

Instantly share code, notes, and snippets.

@mrosata
Created December 19, 2017 16:53
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 mrosata/0963c4a3cb38b195040f99acedcb260a to your computer and use it in GitHub Desktop.
Save mrosata/0963c4a3cb38b195040f99acedcb260a to your computer and use it in GitHub Desktop.
The React Starter Kit public/index.html template with Facebook Account Kit
REACT_APP_FB_APP_ID="12345-abcde"
REACT_APP_FB_ACCOUNT_KIT_VERSION="v1.2"
REACT_APP_META_THEME_COLOR="#FAFEFA"
REACT_APP_HTML_TITLE="React/Redux/Reselect Starter"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="%REACT_APP_META_THEME_COLOR%">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<title>%REACT_APP_HTML_TITLE%</title>
</head>
<body>
<noscript>
This site is only viewable from JavaScript enabled browsers
</noscript>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '%REACT_APP_FB_APP_ID%',
cookie : true,
xfbml : true,
version : '%REACT_APP_FB_ACCOUNT_KIT_VERSION%'
})
FB.AppEvents.logPageView()
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0]
if (d.getElementById(id)) { return }
js = d.createElement(s)
js.id = id
js.src = 'https://connect.facebook.net/en_US/sdk.js'
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'))
</script>
<!-- React App Root Element -->
<div id="root"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment