WhatsApp Business On-Premises API Couldn't find `error_subcodes` documentations - facebook

I am using "WhatsApp Business On-Premises API" for submitting templates. When something is wrong with template i.e. formatting whatsapp throws exception in this format
{
"error": {
"code": 100,
"type": "OAuthException",
"message": "Invalid parameter",
"fbtrace_id": <id>,
"is_transient": false,
"error_subcode": 2388047,
"error_user_msg": "Message body can't have more than two consecutive newline characters.",
"error_user_title": "Message body format is Incorrect"
}
}
i want documentation for all the error_subcodes so that i can translate them and show bases on the language for the user who is submitting the template.
PS: i have seen https://developers.facebook.com/docs/whatsapp/on-premises/errors#error but doesn't give all the error_subcodes fall under code 100.
i've also posted over community but couldn't get help there https://developers.facebook.com/community/threads/367295468710196/?post_id=367295472043529

Related

API Graph Facebook - Creation page User TEST

I'm trying to use the Graph api to create pages. So I have an application type Entreprise, and a Test User. I tried this:
Post request to [userTest_id]/accounts/
Params:
{
"name": "Test Page One",
"about": "This is the first page created to check the api",
"cover_photo": {
"url": "https://i.etsystatic.com/6293506/r/il/ea9cf8/1809124703/il_fullxfull.1809124703_swn3.jpg"
},
"picture": "https://i.etsystatic.com/6293506/r/il/ea9cf8/1809124703/il_fullxfull.1809124703_swn3.jpg",
"category_list": "[\"174177802634376\"]"
}
I use user token
I get this error:
{
"error": {
"message": "Unsupported post request. Object with ID '[userTest_id]' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "ATSiLLBx2O1yOuPRFxq4r4V"
}
}
I've followed this doc:
https://developers.facebook.com/docs/graph-api/reference/user/accounts/#Creating
What I'm missing plz ?
Thanks.
Facebook API doesn't allow creating Pages in the "real world" scope. You may do it for test users (created on the Role tab) or, in production, you have to get special approval from Facebook (not just permission).

Invalid Parameter Error using facebook graph API

I am passing "https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html" as the url to facebook sharing debugger at the following link:
Facebook Sharing Debugger
We can see all the results which facebook has scraped. If we scroll down there and see the entries listed under the URLs section, we see an entry named Scrape API. If we click that it opens the graph api explorer with fields filled automatically.
POST/v3.2/?scrape=true&id=https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html
It was working before but it suddenly stopped working. The error I get is as seen below:
{
"error": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 1611008,
"is_transient": false,
"error_user_title": "Object Missing a Required Value",
"error_user_msg": "Object at URL 'https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html' of type 'article' is invalid because a required property 'al:ios:url' of type 'appsite' was not provided.",
"fbtrace_id": "Gb0BSdJyfGb"
}
}
What i am trying to achieve here is to get the data which facebook scrapes from the url given to the debugger.
EDIT 1:
If you use the following url as test and do the post request as described above. It works and the result is as follows:
Test URL: https://www.bloomberg.com/news/articles/2019-01-13/asian-stocks-to-start-mixed-with-earnings-in-focus-markets-wrap?srnd=premium
RESULT:
{
"url": "https://www.bloomberg.com/news/articles/2019-01-13/asian-stocks-to-start-mixed-with-earnings-in-focus-markets-wrap",
"type": "article",
"title": "Stocks Fall, Bonds Rise as China and Banks Weigh: Markets Wrap",
"image": [
{
"url": "https://assets.bwbx.io/images/users/iqjWHBFdfxIU/iZv8.HNBZJtU/v0/1200x674.jpg"
}
],
"description": "U.S. stocks declined and Treasuries rose as weak Chinese trade data and troubling signals in bank earnings weighed on investor confidence. The dollar edged lower.",
"site_name": "Bloomberg.com",
"updated_time": "2019-01-14T14:38:37+0000",
"id": "2214485868588392"
}
Can someone shed some light as why other urls are not working though they work in the debugger?

How to create Recruiting manager using Facebook for creating XML Job feed?

We need to implement XML Job posting for our Application's Career Portal. We have tried by following Graph API but it is giving following error.
{
"error": {
"message": "(#10) Application does not have permission for this action",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "E4LF9xlAzNl"
}
}

Scraping facebook posts

I want to scrape facebook posts with certain keywords, for example "coca-cola".
Graph api search endpoint (/search?q=coca-cola) does not work, it's returning error like
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "HRj+AhMuMHw"
}
}
I know, that it is also possible to scrape data with selenium using this endpoint: https://www.facebook.com/search/str/coca-cola/stories-keyword/stories-opinion, but I think browser will hang out when DOM tree will be very large. So, is there any other way to do this?
Thank you in advance.

Which permission is required to search topic on graph api

I want to search for a topic using facebook graph api but whenever I do https://graph.facebook.com/v2.7/search?q=search+string&type=topic&access_token={app_access_token} I get the following the following error :
{
"error": {
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "AbVC0S7WD3+"
}
}
I have searched over internet for two days for the solutions and even asked on #facebook channel over IRC but got no results so far.