1
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xmlns:fb="https://www.facebook.com/2008/fbml"> 
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# music: http://ogp.me/ns/fb/music#">
<meta property="fb:app_id"        content="###########" /> 
<meta property="og:type"           content="music.song" /> 
 <meta property="og:url"            content="http://mymediaupload.com/fbindex1.php" />
 <meta property="og:locale"        content="en_US" />
 <meta property="og:title"           content="MyMediaUpload" />
 <meta property="og:description" content="MMU" /> 
 <meta property="og:image"        content="http://www.mymediaupload.com/v4/img/ErrorBG.png" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<div class="fb-login-button" data-show-faces="true" data-width="200" data-max-rows="1" scope="publish_actions"></div>

<input type="button" value="Read" class="openGraphButton" action="song" page="http://mymediaupload.com/fbindex1.php" />
<script type="text/javascript">

$(document).ready(function()
{
    $('.openGraphButton').click(function(){
            var action = $(this).attr('action');
            var page = $(this).attr('page');
            postAction( action, 'article', page);
        });
});

function postAction( action, object_type, object_url ){
    FB.api('/me/music.' + action + '?' + object_type + '=' + object_url, 'post', function(response){
         var msg = 'Error occured';
         if (!response || response.error)
        {
            if (response.error) {
                msg += "\n\nType: "+response.error.type+"\n\nMessage: "+response.error.message;
            }
            alert(msg);
        } 
        else
        {
            alert('Post was successful! Action ID: ' + response.id);
        }
    });
}
</script>

<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '###########', // App ID
      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'; if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/en_US/all.js";
     d.getElementsByTagName('head')[0].appendChild(js);
   }(document));
</script>
</body>
</html>

我已经使用了 facebook 自己的操作.. 我已经搜索和搜索了!我修复了除了最后一个错误之外的所有错误,我得到了错误:

发生了错误

类型:GraphMethodException

消息:不支持的发布请求。

请帮忙!我找不到答案!

4

0 回答 0