问题
i am trying to put a like button on a page in a chrome extension that i've developed.
i use the simple XFBML version:
<fb:like href="http://www.mydomain.com/page?param=1&otherparam=2" send="false" layout="standard" width="400" show_faces="false" font="arial" ref="chrome_notification"></fb:like>
and of course i use the JavaScript SDK.
when i upload this page into my webserver, everything works just fine. but when i run this page within my chrome extension, the like button itself works just fine, but the comment popup doesn't show.
in addition - i get these error masseges in the console:
Unsafe JavaScript attempt to access frame with URL chrome-extension://eindnjdghfmigkecgibjclhdnadlnbhm/../mypage.html from frame with URL https://www.facebook.com/plugins/like.php?api_key=&channel_url=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df3d383d278%26origin%3Dchrome-extension%253A%252F%252Feindnjdghfmigkecgibjclhdnadlnbhm%252Ff44dd2768%26relation%3Dparent.parent%26transport%3Dpostmessage&extended_social_context=false&font=arial&href=http%3A%2F%2Fwww.mydomain.com%2F%3Fparam%3D1%26otherparam%3D2&layout=button_count&locale=en_US&node_type=link&ref=chrome_notification&sdk=joey&send=false&show_faces=false&width=400. Domains, protocols and ports must match.
and -
Unsafe JavaScript attempt to access frame with URL https://www.facebook.com/plugins/like.php?api_key=158698534219579&channel_url=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df3d383d278%26origin%3Dchrome-extension%253A%252F%252Feindnjdghfmigkecgibjclhdnadlnbhm%252Ff44dd2768%26relation%3Dparent.parent%26transport%3Dpostmessage&extended_social_context=false&font=arial&href=http%3A%2F%2Fwww.mydomain.com%2F%3Fparam%3D1%26otherparam%3D2&layout=button_count&locale=en_US&node_type=link&ref=chrome_notification&sdk=joey&send=false&show_faces=false&width=400 from frame with URL http://www.facebook.com/plugins/comment_widget_shell.php?api_key=&locale=en_US&master_frame_name=f38cd100f8&sdk=joey. Domains, protocols and ports must match.
can anyone help me to find a solution for this?
回答1:
Could it possibly by related to this known Facebook bug?
http://developers.facebook.com/bugs/293075054049400
Basically, one gets this behavior if secure browsing is enabled on the Facebook user's account.
来源:https://stackoverflow.com/questions/7852392/the-the-popup-window-flyout-of-a-like-button-doesnt-show-up-in-a-chrome-ext