简体   繁体   中英

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. 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. Upon clicking the Post To Facebook button, I get the error, "Invalid Action Link URL: The post's action links must be valid URLs." The JSON response has an error_code value of 1349119.

JS Code:

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:

{
    "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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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