I am developing a WP plugin and want to load Facebook JS SDK and then when user clicks login button, load the login workflow.
What I have right now is JS SDK loading in my add_filter ('the_content') method which also loads my plugin's JS file.
I have tried adding FB SDK loading code to add_action('wp_head') but it adds the SDK to .
Error I am having is that when my plugin's JS is called, it says that FB.login is undefined. Even in developer console, it says that login is undefined. I can still see api methods in console.
Can someone point me to any existing questions/documentation which shows how to properly call the FB SDK in a Wordpress plugin (no edits possible in theme).
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire