App Directory SDK

Documentation

Frequently Asked Questions


After loading my app stream, I am getting this js error: 'Unsafe JavaScript attempt to access frame with URL https://abc.abc.abc from frame with URL https://xyz.xyz.xyz Domains, protocols and ports must match'.
1. Make sure there is no error on your app stream/plugin page.
2. Make sure your app stream/plugin is using the correct hsp.js. Please use: https://hootsuite.s3.amazonaws.com/jsapi/0-5/hsp.js.
3. Make sure apiKey in hsp.init() is correct.
4. Make sure receiverPath in hsp.init() is correct.
5. Make sure your app receiver page shares the same domain as your app stream/plugin.
6. If the HootSuite dashboard is in SSL mode, make sure you have provided the correct secure iframe url in the app stream setting page. Make sure your app receiver URL is also using SSL. It is important that both hsp.js and app_receiver.js are loaded in https.



I am getting 'API Key: xxxxxxxxxxxxxxxxxxx is not correct, please check your app settings' error on the dashboard.
Make sure apiKey in hsp.init() is correct.



I am getting 'API Key: is not correct, please check your app settings' error on the dashboard.
Make sure apiKey in hsp.init() is not empty. If you use hsp.js in your popup or other iframe pages, make sure hsp.init() is not called again. The only hsp function that is legitimate to use outside app stream/plugin page is hsp.cloaseCustomPopup(apiKey, pid), and it doesn't require init.



After loading my app stream, I am getting this js error: 'Uncaught TypeError: Cannot call method 'appendChild' of null'.
Check your hsp.init function. Make sure it is called after the page is completely loaded. e.g. put the function inside $(document).ready().



How to use hsp function on my custom popup page?
If your popup and app stream/plugin are in the same domain, it is recommended that your popup uses the following javascript function to communicate back to your stream/plugin page and run the hsp function from there: window.parent.frames[apiKey_pid].hsp.some_function().