问题
my site is alonsart.com... when clicking the send button on my site..it opens a blank box...
this is what my code looks like:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'my_id', // App ID
channelUrl : '//alonsart.com/index.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
and of course the div
<div style="margin-top:20px" class="fb-like" data-send="true" data-width="450" data-show-faces="true"></div>
any idea why it wouldnt show anything when clicked??
thanks
回答1:
Don't know if you already solved the problem or not, but for future reference, I found that the Debug tool offered by Facebook [ https://developers.facebook.com/tools/debug ] was a lifesaver in troubleshooting this exact same issue on a site I was working on.
You give it a URL, it will scrape it, and give you a breakdown of exactly what is wrong with it (From an Open Graph perspective)
回答2:
Although this question has been asked quite some time back but it might help someone looking for occasional problems with like and send plugin.
Yesterday the like and send plugin stopped working for my site too and there was nothing wrong with the implementation. Even the send button on http://developers.facebook.com had stopped working yesterday and today it is working back again.
So check if the plugin is working on others sites too or not. If not then most likely the problem is at Facebook's end and not your end.
来源:https://stackoverflow.com/questions/10865122/facebook-send-button-opens-a-blank-box