简体   繁体   English

Facebook share_open_graph错误:“无效的操作链接URL:帖子的操作链接必须是有效的URL。”

[英]Facebook share_open_graph error: “Invalid Action Link URL: The post's action links must be valid URLs.”

I have a site where I am trying to set up a Facebook Share button for a custom object. 我有一个网站,我正在尝试为自定义对象设置Facebook分享按钮。 The custom object is created successfully. 自定义对象创建成功。 I can verify object creation in the Object Browser with owner as the custom app and type as the custom object type. 我可以在对象浏览器中验证对象的创​​建,并以所有者作为自定义应用程序,然后键入作为自定义对象类型。

The call to FB.ui is successful, a dialog is opened that contains the correct data for the custom object. 调用FB.ui成功,将打开一个对话框,其中包含自定义对象的正确数据。 Upon clicking the Post To Facebook button, I get the error, "Invalid Action Link URL: The post's action links must be valid URLs." 单击“ 发布到Facebook”按钮后,出现错误“无效的操作链接URL:帖子的操作链接必须是有效的URL。” The JSON response has an error_code value of 1349119. JSON响应的error_code值为1349119。

JS Code: JS代码:

function PostStatus(id, qtext) {
    var msg = $(id).val();  
    var o = {'object': {"og:title" : qtext, "og:description": msg}, 'access_token': '<% = AccessToken %>'};
    FB.api("app/objects/namespace:customobject",
    'POST',
    o,
    function(response){
        if (response.id){
            FB.ui({method: 'share_open_graph', 
                action_type: 'og.likes', 
                action_properties: JSON.stringify({object: response.id}),
                display: 'popup'
                }, function(response){}

            );
        }
    });
}

If I change the response.id value to http://www.google.com , I can successfully post to my wall. 如果将response.id值更改为http://www.google.com ,则可以成功张贴到墙上。

Response: 响应:

{
    "error_code" : 1349119,
    "error_message" : "Invalid+Action+Link+URL:+The+post's+action+links+must+be+valid+URLs."
}

I can't find a reference to this error code anywhere. 我在任何地方都找不到对此错误代码的引用。

This is a known issue that we are tracking in this bug report: 这是我们在此错误报告中跟踪的已知问题:
sharing openGraph action type og.likes/og.shares fails with object id (needs url) 共享openGraph操作类型og.likes / og.shares失败,并带有对象ID(需要URL)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM