1

js sdk を使用してアクションを公開しようとしています。

私のアクションコードは

 function watchvid()
  {
      FB.api(
        '/me/video.watches?video=http://watchvideoz.in/watch.php?v=34',
        'post',
        function(response) {
           if (!response || response.error) {

              alert(JSON.stringify(response.error)); 
           } else {
var a = response.id;
    MyApp.color = a;

           }
        });
  }

私のメタタグは

<meta property="og:url" content="http://watchvideoz.in/watch.php?v=34"/>    
<meta property="fb:app_id" content="288976161189701"/>  
<meta property="og:title" content="Buckys C++ Programming Tutorials - 9 - Functions"/> 
<meta property="og:type" content="video.other" />
<meta property="og:image" content="http://img.youtube.com/vi/bsWWHo4KDHE/hqdefault.jpg"/>   
<meta property="og:description" content="For all of our videos, visit http://thenewboston.com"/>
<meta property="og:site_name" content="YourVidz"/>

しかし、次のエラーが表示されます

{"message":"(#3502) Object at URL http://watchvideoz.in/watch.php?v has og:type of 'website'. The property 'video' requires an object of og:type 'video.other'. ","type":"OAuthException","code":3502}

上記のエラーでは、=の後の値は無視されます。つまり、 http: //watchvideoz.in/watch.php?v のみを取得します。

fb デバッガー ツールは正しい値を取得していますが、

http://watchvideoz.in/watch.php?v=34

4

1 に答える 1

0

URL をクエリ文字列パラメーターとして渡す場合は、それを「URL エンコード」する必要があります。独自のクエリ文字列の「&」は、「親」URL のものと混同されません。http://watchvideoz.in/watch.phpp%3Fv%3D34を試してください

于 2012-05-08T18:59:17.933 に答える