Facebook Payments - Error Code : 1383008 . The app you're using is not responding - facebook

We're moving from the old facebook payments method (which involved FB credits) to the new local currency system. We're using dynamic pricing.
var obj = {
method: 'pay',
action: 'purchaseitem',
product: 'produrl.php',
quantity: 1,
};
FB.ui(obj, FBCcallback);
(Is defining purchaseitem action is "required" or mandatory)
The product url has been scraped and it does give the required results in the debug tool. The callback url is also tested and is working. Yet the error persists. Someone suggested that we leave it over night, that didn't work out either.
Any ideas?

One of the reasons why Facebook would consider the server callback to be not responsive is if the server script caused an error. So if you're using PHP and you get this error, check your error log or use Facebook's sample script for testing.
If the sample works, then there's definitely an error in your PHP script.

Related

firebase dynamic links in stripe throws err_unknown_url_scheme

I've been developing an app with firebase and stripe payment. I've created a checkout session in stripe and added firebase dynamic links for the success_url and cancel_url. The URLs are working fine. I've tested them outside stripe with a simple html file and it opens the app and takes the user to the correct page. If the page doesn't exist it'll take the user to the assigned website. This is stripe checkout session code:
const session = await stripe.checkout.sessions.create({
line_items: [{
price_data: { currency: 'INR', unit_amount: amount, product_data: { name: 'name' } },
quantity: 1,
}],
mode: 'payment',
success_url: 'https://-------.page.link/payment-success',
cancel_url: 'https://-------.page.link/payment-failed',
payment_intent_data: {
application_fee_amount: fee
},
}, {
stripeAccount: req.query.stripeId,
});
I've changed up the actual link since I don't know how much I'm allowed to share. But I can guarantee the dynamic links works fine. But after payment, the test payment at least, it's suppose to open the app and take the user to a payment success page. AND it was working fine for the first 2 or 3 days. After payment it re-opened the app and took the user to the correct page. But when I tried a few days later, this is what it's taking us to:
Again, I've removed the link since I don't know how much I'm allowed to share. It won't even open the app right now. It just shows this message in the browser. Both success and cancel url are doing the same. Why does the links work outside the function but not in it? Has anyone ever faced any similar issues before? Any help will be greatly appreciated.
It seems like you're trying to open the Checkout Session in a WebView which causing the issue in the redirect. Webviews don't know how to handle an URL Scheme other than http:// or https://. That being said, your problem isn't uncommon and there are multiple ways of solving this.
Your first approach would be to open the Checkout Session in an external browser as described in this answer or try to create your own WebViewClient and override shouldOverrideUrlLoading method like described in this answer. Just note that since the last edit of that answer the signature of the shouldOverrideUrlLoading method has changed but the logic should still be used the same way but instead of dealing with the String url, you will have to deal with a WebResourceRequest.
Had the same issue. I solved it by changing the mode like following:
await launchUrl(
url,
mode: LaunchMode.externalApplication, // Add this line
)
url_launcher version => 6.1.7

Why does Facebook leadgen ads testing tool give a 102 server error?

I've created a Facebook app, linked it with a business, submitted and passed review, the business is verified, contracts signed, the app has leads_retrieval permission, the app status is now live.
I can test it under the webhooks link in the side menu, my end point receives the test data from Facebook. The data shown below is received by my server.
When I test using the lead ads testing tool I instantly get a 102, server error, and nothing is received by my server. See below for the message.
I've spent so long getting to this stage and every step has been painful!
Can anyone suggest why using the lead ads testing tool results in an error and what I can do to resolve the issue.
Cheers
I've been struggling with this too.. Apparently you can't use it on development apps anymore. Found the answer here: https://stackoverflow.com/a/57397525/8439792
I think I found your problem! It is when you subscribe to your apps. Here is the link that shows the subscribed_fields and scope should be:
https://stackoverflow.com/a/54713182/7313872
I was going straight from the demo and the subscribed_fields is set to 'feeds' and the scope was only manage_pages. You need to change it like in the example in the above link. I will also provide the snippets I changed below:
subscribed_fields - in subscribe apps function
FB.api(
'/' + page_id + '/subscribed_apps',
'post',
{access_token: page_access_token, subscribed_fields: 'leadgen'},
function(response) {
console.log('Successfully subscribed page', response);
}
);
scope - end of facebook login function
{scope: ['manage_pages', 'leads_retrieval']});
Hope this helps!
Facebook had the problem in their startup documentation for the webhooks. I have notified them in a bug, and does look like they have fixed the documentation to now subscribe to "leadgen" and not "feeds".
https://developers.facebook.com/support/bugs/681262475926363/
https://developers.facebook.com/docs/marketing-api/guides/lead-ads/quickstart/webhooks-integration/

API Error Code 1383146 in Facebook Canvas API for Unity while making payment

I have implemented payments in my Unity app and have defined products in HTML form in my server, and have crawled them with FB's debug tool. The products are identical to Facebook's payments example apart from pricing and naming, as well as the photo link.
Yet, when I run FB.Canvas.Buy after deploying the app to Canvas, I get the following error:
An error occurred. Please try again later.
API Error Code: 1383146
API Error Description: invalid og type. Expected og:product, got website
This error has no documentation I can seem to find on any search engine or on Facebook's own documentation.
Any help would be appreciated, thank you.
I found the problem was I was passing the actual URL of the HTML product into the pay dialog rather than the graph object ID.
When using the graph object ID, I am finally able to perform purchases.
I meet the same error code 1383146 and found the root cause.
In the beginning i expect the product URL will be my current URL plus product.html. For example. My page is https://a.b.c/def/ and i expect FB to parse my product page https://a.b.c/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 FB will add query string when POST to my canvas page URL in some cases. URL will become https://a.b.c/def/?fb_source=search&ref=ts&fref=ts. Then my code will be wrong because i use window.location.href. So i update code and never meet 1383146 issue.
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) {
...
});
In my case, the Facebook scraper could not reach the web server that is hosting the products (it could only be reached from our office, which I did not know). In that case, Facebook constructs a default object of type website and then complains about that.
You can see this in action with the Facebook Sharing Debugger. Enter your product URL, and hit the 'Debug' and maybe 'Scrape Again' buttons. It will show 'Warnings That Should Be Fixed'. It will only show the first warning by default, make sure you show all warnings. For me, one of those warnings further down was 'Cannot Connect To Server'. So that was the REAL problem

Unity3d web app facebook Sdk payments API Error Code: 1383008

I am developing a facebook game in Unity3d using facebook's new facebook sdk, running the app as a web app inside facebook in sandbox mode.
Today I started implementing a shop in the game for microtransactions using their canvas pay model. I read their documentation and javascript tutorial for payments (they don't have one yet for unity) and created a simple button that when you click you are able to buy some ingame currency(coins).
Now my open graph og:product is tested and looks accurate and my c# code in unity is this:
public void onCoinsClicked()
{
FB.Canvas.Pay(
product: "my_url/products/coin.html",
action: "purchaseitem",
quantity: 1,
testCurrency:"EUR",
callback: delegate(FBResult response) {
FbDebug.Log("The result of the purchase is: " + response.Text);
});
FbDebug.Log("onCoinsClicked: ");
}
When i test it using a payments tester user that i have, it throws the following error when displaying the payment popup:
An error occurred. Please try again later.
API Error Code: 1383008
API Error Description: The app you're using isn't responding. Please try again. If you keep seeing this error, try again in a few hours.
If some of you kind people have experienced this before please enlighten me :)
Thank you.
Have you run your product's URL through the Open Graph Debugger (https://developers.facebook.com/tools/debug)? It's possible that a crawler error is causing the issue, and it would be good to make sure that the problem isn't at the data level.

facebook local currency payments error

I have a questions of facebook local currency payments error.
Today I recieved this message:
"We didn't receive all the information we needed from this app to complete your purchase. You haven't been charged for this purchase, so please try again. If you keep seeing this error, contact the app developer."
And I don't understand what the reason. Yesterday I think it worked fine.
JS request
var obj = {
action: "purchaseitem"
method: "pay"
product: "https://www.sozzial.com/fb/subscriptions.html"
quantity: "50"
quantity_max: 5000
quantity_min: 1
request_id: "3MJhipp24N0THO+eExGvsdoRZKsF+8vsAD3Po1NRrqCTKSwlDKRO4Wytwh+gP1UrloU37lOJC9cXF7FOLSBAosoXIugOrNtAEMOobnxm6Bzhi7+eWIASl4jA1lNcG3AndHyNfv0OI+IPLXspH76QslI099c="
};
FB.ui(obj, verifyPayment);
We have managed to get rid of this error by submitting the graph object URL (in your case this link) to the Facebook Object Debugger at: Facbook Debug Tool
I had this error because all my payments were done using same request_id.