Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何更正此facebook错误?_Javascript_Facebook - Fatal编程技术网

Javascript 如何更正此facebook错误?

Javascript 如何更正此facebook错误?,javascript,facebook,Javascript,Facebook,我有一个小的facebook应用程序,我想在其中发布一个swf文件到用户的墙和我的墙。到目前为止,我已经得到了这段代码。但是,当我单击“单击以共享”时,我遇到了一个错误。我如何解决这个问题 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.

我有一个小的facebook应用程序,我想在其中发布一个swf文件到用户的墙和我的墙。到目前为止,我已经得到了这段代码。但是,当我单击“单击以共享”时,我遇到了一个错误。我如何解决这个问题

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="../JQuery/JQuery.js"></script>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">

    function publishStream(targetId, name, links, picture, source, userName,message) {
    FB.ui(
            {
                 method: 'feed',
                 to: targetId,
                     name: name,
                 link: links,
                     picture: picture,
                 source:  source, // The URL of a media file (e.g., a SWF or video file) attached to this post
                     caption: 'Shared by '+userName,
                     actions:  {name: 'Try App', link: links},
                     message: message

            },
            function(response){
                 if (response && response.post_id) {
                  //alert('Post was published.');
                 } else {
                  // alert('Post was not published.');
                 }
        });
    }
</script>
</head>

<body>


<p onclick="publishStream('id', 'name', 'http://t2.gstatic.com/images?q=tbn:ANd9GcSclvwUe23dKnjge54JJH6kQM-8iyTRBT_N5-TCWojVmcD0bTi8YQ', 'http://t2.gstatic.com/images?q=tbn:ANd9GcSclvwUe23dKnjge54JJH6kQM-8iyTRBT_N5-TCWojVmcD0bTi8YQ', 'http://t2.gstatic.com/images?q=tbn:ANd9GcSclvwUe23dKnjge54JJH6kQM-8iyTRBT_N5-TCWojVmcD0bTi8YQ','username','Hello') ">Click to share</p>
</body>
</html>

上面Igy的评论很可能是正确的。在应用程序高级设置下,尝试禁用stream post URL安全选项。此选项强制您在应用程序中保留链接,这样外部引用将失败。

您会收到什么错误消息?您的应用程序是否启用了stream post安全性?
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.