FB.init({
appId : '{my-app-id}',
cookie : false, // enable cookies to allow the server to access
// the session
xfbml : true, // parse social plugins on this page
version : 'v2.5' // use graph api version 2.5
});
Replace {my-app-id} with your facebook APP ID .. if you don't have one, create a facebook app id by logging into facebook developer portal .. https://developer.facebook.com
Hi, I followed your approach but getting below error:
Failed to load resource: net::ERR_NAME_RESOLUTION_FAILED https://www.facebook.com/connect/ping?client_id={my-app-id}&domain=localhost&origin=1&redirect_uri=http%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter%2Fr%2FP5DLcu0KGJB.js%3Fversion%3D42%23cb%3Dfed5cec4%26domain%3Dlocalhost%26origin%3Dhttp%253A%252F%252Flocalhost%253A3000%252Fff1a152fc%26relation%3Dparent&response_type=token%2Csigned_request%2Ccode&sdk=joey
My code looks like this:
FB.init({ appId : '{my-app-id}', cookie : false, // enable cookies to allow the server to access // the session xfbml : true, // parse social plugins on this page version : 'v2.5' // use graph api version 2.5 });