javascript - Error while trying to create a Facebook chat monitor google chrome extension -


i'm trying create extension google chrome allow me read facebook page's conversations(messages). right now, i'm having trouble logging facebook using chrome extension. i'm getting error "can't load url: domain of url isn't included in app's domains. able load url, add domains , subdomains of app app domains field in app settings." don't have clear idea on how proceed. can please point out what's wrong or can suggest better alternative reading facebook page's conversations using graph api in google chrome extension. or is possible firefox add-on? code i'm using

manifest.json

{ "name": "facebook connect chrome extension", "version": "1.0", "description": "this plugin showing how facebook connect/graph api works on chrome extension.", "content_security_policy": "script-src 'self' https://connect.facebook.net; object-src 'self'", "background":   {"page":"background.html"  },  "browser_action": {  "default_popup": "popup.html",  "default_icon":"icon.png"  }, "manifest_version":2, "permissions": [ "tabs", "http://*.facebook.com/*" ] } 

popup.html

<html>   <head>     <title>facebook connect chrome extension</title>     <script type="text/javascript" src="popup.js"></script>   </head>   <body>     <h1>facebook connect chrome extension</h1>     <div id='status'></div>   </body> </html> 

popup.js

window.addeventlistener("load", function(){ window.fbasyncinit = function() { fb.init({   appid      : '197374294047884',   xfbml      : true,   version    : 'v2.8' }); fb.appevents.logpageview(); fb.getloginstatus(function(response) {     if (response.status === 'connected') {     document.getelementbyid('status').innerhtml = 'connceted'    // user logged in , has authenticated    // app, , response.authresponse supplies    // user's id, valid access token, signed    // request, , time access token     // , signed request each expire    var uid = response.authresponse.userid;    var accesstoken = response.authresponse.accesstoken;    } else if (response.status === 'not_authorized') {    // user logged in facebook,     document.getelementbyid('status').innerhtml = 'not autorized'    // has not authenticated app    } else {    // user isn't logged in facebook.    document.getelementbyid('status').innerhtml = 'not connected'    }  }); };   (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'));    }); 


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -