I meet the same error code 1383146 and found the reason. In the beginning, I expect the product URL to be my current URL plus product.html
. For instance. My page is https: // abc / def / , and I expect FB to parse my product page https: //abc/def/product.html
var productURL = window.location.href + 'product.html'; var obj = { method: 'pay', action: 'purchaseitem', product: productURL }; FB.ui(obj, function(data) { ... });
But I found that FB will add a query string when POST to my canvas page URL in some cases. The URL will become https: // abc / def /? Fb_source = search & ref = ts & fref = ts . Then my code will be wrong, because I use window.location.href
. Therefore, I am updating the code and never encountering issue 1383146.
var productURL = window.location.protocol + "//" + window.location.host + window.location.pathname + 'product.html'; var obj = { method: 'pay', action: 'purchaseitem', product: productURL }; FB.ui(obj, function(data) { ... });
source share