// To download the Facebook SDK and access the Graph API, you should
// update the content security policy in your manifest.json with the below
"content_security_policy": "script-src 'self' https://connect.facebook.net https://graph.facebook.com; object-src 'self'"
// The rest of the code below can be added to the javascript file of
// one of your UI pages
// Download Facebook's Javascript SDK as shown in Facebook's docs.
// Note, you must call "https://connect.facebook.net/en_US/sdk.js"
"content_security_policy": "script-src 'self' https://connect.facebook.net https://graph.facebook.com; object-src 'self'"
window.fbAsyncInit = function() {
FB.init({
appId : '<your-app-id>',
autoLogAppEvents : true,
xfbml : true,
version : 'v2.10'
});
FB.AppEvents.logPageView();
authenticateWithFacebook = () => {
return new Promise((resolve, reject) => {
const TYPE = 'token';
const RANDOM_STRING = uuid.v4();
const URI = chrome.identity.getRedirectURL();
const AUTH_URL = `https://www.facebook.com/v2.10/dialog/oauth?
client_id=${CLIENT_ID}
&redirect_uri=${URI}
&state=${RANDOM_STRING}
loadGroupFeed = (accessToken) => {
return new Promise((resolve, reject) => {
FB.api(
"/<Group-ID-here>/feed",
{ access_token: accessToken },
function (response) {
if (!response || response.error) {
reject(response.error)
} else {
//npm modules
const express = require('express');
// create the server
const app = express();
// tell the server what port to listen on
app.listen(3000, () => {
console.log('Listening on localhost:3000')
//npm modules
const express = require('express');
// create the server
const app = express();
// create the homepage route at '/'
app.get('/', (req, res) => {
res.send('you just hit the home page\n')
//npm modules
const express = require('express');
// create the server
const app = express();
// create the homepage route at '/'
app.get('/', (req, res) => {
console.log(req)
//npm modules
const express = require('express');
const uuid = require('uuid').v4
// create the server
const app = express();
// create the homepage route at '/'
app.get('/', (req, res) => {
//npm modules
const express = require('express');
const uuid = require('uuid/v4')
const session = require('express-session')
// create the server
const app = express();
// add & configure middleware
OlderNewer