我该如何纠正这个facebook错误?

我该如何纠正这个facebook错误?

问题描述:

我有一个小的Facebook应用程序,我想发布一个SWF文件到用户的墙壁和我的墙上。到目前为止我已经得到了这段代码。但是,当我点击点击分享时出现错误。怎么办?我解决这个问题?我该如何纠正这个facebook错误?

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

的错误是

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. 
+0

你会得到什么错误信息? –

+0

您的应用程序是否启用流后置安全性? – Igy

从以上的IgY的意见是最有可能是正确的。在您的应用程序高级设置下,请尝试禁用流发布URL安全选项。这个选项强制你基本上保持你的链接在你的应用程序中,所以外部引用将失败。