0

私はOpenGraphを機能させようとしています。アプリの管理では、次の2つの項目があります。

Action Types: write - note
Object Types: note

理由はわかりませんが、OpenGraphはまだ機能しません。このチュートリアルに従いましたが、ボタンを押してもエラーが発生しました。

関連コード:

     <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# my_url: http://ogp.me/ns/fb/my_url#">
  <meta property="fb:app_id" content="ID" /> 
  <meta property="og:type"   content="note" /> 
  <meta property="og:url"    content="http://google.com" /> 
  <meta property="og:title"  content="Sample text" /> 
  <meta property="og:image"  content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" /> 

<script type="text/javascript">
  function postCook()
  {
      FB.api(
        '/me/my_url:write',
        'post',
        { note: 'http://google.com' },
        function(response) {
           if (!response || response.error) {
              alert('Error occured');
           } else {
              alert('Cook was successful! Action ID: ' + response.id);
           }
        });
  }
</script>
      <script>
        window.fbAsyncInit = function() {
          FB.init({
            appId      : 'ID', // App ID
            status     : true, // check login status
            cookie     : true, // enable cookies to allow the server to access the session
            xfbml      : true  // parse XFBML
          });
        };

        // 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>

    <form>
      <input type="button" value="Write" onclick="postCook()" />
    </form>

私は一日中OpenGraphのセットアップで遊んでいますが、それでも正しい構成を見つけることができません。

私に何か重要なことが欠けていますか?または、この基本的なアプリケーションをどのように深くデバッグできますか?

編集エラーメッセージには次のように書かれています。

code: 2500
message: "Unknown path components: /my_url:write"
type: "OAuthException"

また、(Facebook開発者管理からの)リンクを開くと、すべてのアクションが表示されるはずですが、次のようになります。

{
   "data": [

   ]
}
4

0 に答える 0