“shared a link via Widget Share Log App.”

試著忘記壹切 提交于 2020-02-02 13:26:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!