问题
I added some share buttons to my posts on a Wordpress site (by using the Facebook developer tool codes) and every time I share something it appends “shared a link via Widget Share Log App” to the end of the Facebook post. So when I share it’ll say “myName shared a link via Widget Share Log App.” I haven’t added any plugins, I simply installed WordPress then added the Sahifa theme and have been modifying it and setting it up. Anyone have any clue how to get rid of this? The Facebook share code doesn’t have an AppID in it or anything.
回答1:
you need to create an app id on facebook you can request one here [https://developers.facebook.com/] once you have that you need to initiate your facebook sdk like this:
window.fbAsyncInit = function() {
FB.init({appId: '{you app id}', status: true, cookie: true,
xfbml: true});
};
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
That's all
来源:https://stackoverflow.com/questions/21636183/shared-a-link-via-widget-share-log-app