I make a chrome extension to like specific page posts automatically. With a simple popup controller and background thread to handle fb api interactive
I cannot load facebook js api into extension page with official example method.
The script jssdk was loaded and executed checked by chrome developer tools.
But window.FB is not defined by script loaded!!!
- I also add script tag manually.
- It appeared both background thread and popup window.
- If inject with iframe to load page, it will success loaded window.FB and popup a login/authenticate window. But it had a cross domain problem!
- The div#fb-root is exist.
- menifest.json has content_security_policy
- script-src 'self' https://connect.facebook.net; object-src 'self'