尝试从我的localhost网站分享Facebook上的内容时出现服务器错误?

时间:2015-12-17 12:46:14

标签: php facebook

hay guys我想把我的网站 url 分享到 facebook ,但是我收到了这个错误

  

网站在检索https://www.facebook.com/v2.5/dialog/feed?app_id=504374239724296&caption=w3lessons.info&description=w3lessons.info%20is%20a%20programming%20blog%20maintained%20by%20Karthikeyan%20K.%20Tutorials%20focused%20on%20Programming%2C%20Jquery%2C%20Ajax%2C%20PHP%2CHTML5%2C%20CSS3%2C%20Web%20Design%20%20and%20MySQL&display=popup&e2e=%7B%7D&link=http%3A%2F%2Flocalhost%2Faddypin%2Fhome&locale=en_US&name=W3lessons%20-%20PHP%2C%20MYSQL%2C%20HTML5%2C%20CSS3%2C%20jQuery%2C%20Ajax%2C%20Facebook%20Style%20Scripts&next=http%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D42%23cb%3Df1417dc9b8%26domain%3Dlocalhost%26origin%3Dhttp%253A%252F%252Flocalhost%252Ff34a2d8d4c%26relation%3Dopener%26frame%3Df293ebbe14%26result%3D%2522xxRESULTTOKENxx%2522&picture=http%3A%2F%2Flocalhost%2Faddypin%2Fincludes%2Fimages%2Flogo.PNG&sdk=joey&version=v2.5时遇到错误。它可能已关闭以进行维护或配置不正确。

代码

<script type="text/javascript">
  function shareOnFB() {
      FB.init({
            appId      : '504374239724296',
            xfbml      : true,
            version    : 'v2.5'
        });
    var e = {
        method: "feed",
        link: "http://localhost/addypin/home",
        picture: "http://localhost/addypin/includes/images/logo.PNG",
        name: "Addypin allow to register your addresses once and share it every where at anytime",
        caption: 'addypin.com',
        description: "Hay start register your address here."
    };
    FB.ui(e, function(t) {
        if (t["post_id"]) {
          //after successful sharing, you can show your download content here
        }
    })
  }

,我的按钮是

<input onclick="shareOnFB()" type="image" src="<?php echo site_url('includes/images/facebook_icon.png')?>">

,此代码位于页面末尾

<div id="fb-root"></div><script>(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/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script>

0 个答案:

没有答案