编程语言
首页 > 编程语言> > javascript – 未知的路径组件

javascript – 未知的路径组件

作者:互联网

我尝试发布“观看”动作,但我总是这个错误:

Error occured

Type: OAuthException

Message: Unknown path components: /MyAppName:watch

这是我的JS功能:

function postWatch()
  {
FB.api('/me/MyAppName:watch' + 
    '?video=http//myLink.com','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);
    }
    });
  }

这是我的og:标签

<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# video: http://ogp.me/ns/video#">
    <meta property="fb:app_id" content="MyAppID" />
    <meta property="og:title" content="MyTitle" />
    <meta property="og:image" content="http://MyUrlImage.com" />
    <meta property="og:description" content="MyDescription" />
    <meta property="og:url" content="MyLink.com">
    <meta property="og:site_name" content="MySiteName" />
    <meta property="og:type" content="video.movie" /> 

有任何想法吗 ?

谢谢

标签:javascript,facebook,facebook-graph-api,opengraph
来源: https://codeday.me/bug/20190826/1730674.html