WhatsApp Business API - Edit Template - facebook

I'm trying to send a POST request to edit a template message of WhatsApp:
POST /{whatsapp_template_id}
{
"name": "my_template",
"language": "en_US",
"category": "transactional",
"components": [
{
"type": "BODY",
"text": "whatsapp buddy?"
}
]
}
Receiving (#3) Application does not have the capability to make this API call.

Currently, there is no edit template API, as per the documentation it will Available from September 7, 2022.

Related

message template are not working in kore.ai

I want to display list to the user with kore.ai, currently, I am using telegram but the template is not working it is just showing the code.
var message={
"type": "template",
"payload":
{
"template_type": "button",
"text": "What do you want to do next?",
"buttons":
[{
"type": "web_url",
"title": "Show Website",
"url": "https://petersapparel.parseapp.com"
},
{
"type": "postback",
"title": "Start Chatting",
"payload": "USER_DEFINED_PAYLOAD"
}
]
}
}
print(JSON.stringify(message));
Expected result:
Some templates are channel specific which means not every end channel supports each and every templates . Please try with different channels such as Web or Facebook messenger, your template will be supported.
You will need to make sure that the template structure is supported by the channel.
The channels usually have the template structures defined on their technical documentation.
Please select the appropriate channel on the bot builder and then use the template structure as they have defined.

Persistent menu not showing in Facebook Messenger chat bot

As I don't know why suggested, using Postman.
Per docs, have succesfully POSTed the configuration to facebook APIs:
which is not supposed to be anyways locale specific. Even I don't see here
Localization: Developers can now provide text in multiple languages (or entirely different menus) for each local your bot's users may come from.
Like my brother, I have tried almost everything so far
This looks like some crazy bug. Is there some work around to add a simplest persistent menu?
Wasted 2 hours on this issue. Until I realised you have to delete the conversation then refresh facebook with ignore cache (ctrl+shift+r in chrome) and then it will show.
The FB API document states that the API link to hit for applying persistent menu to the page specific bot is:
https://graph.facebook.com/v2.6/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>
Notice the me after version number i.e v2.6 in this specific case. However, this did not worked for a lot of people
There is small change in the API link to hit:
graph.facebook.com/v2.6/Page ID/messenger_profile?access_token=PAGE ACCESS TOKEN
Notice that me is replaced with the fb Page Id.
And the sample payload can still be the same:
{
"get_started": {
"payload": "Get started"
},
"persistent_menu": [
{
"locale": "default",
"composer_input_disabled": false,
"call_to_actions": [
{
"title": "Stop notifications",
"type": "nested",
"call_to_actions": [
{
"title": "For 1 week",
"type": "postback",
"payload": "For_1_week"
},
{
"title": "For 1 month",
"type": "postback",
"payload": "For_1_month"
},
{
"title": "For 1 year",
"type": "postback",
"payload": "For_1_year"
}
]
},
{
"title": "fresh jobs",
"type": "postback",
"payload": "fresh jobs"
},
{
"title": "More",
"type": "nested",
"call_to_actions": [
{
"title": "like us",
"type": "web_url",
"url": "https://www.facebook.com/nordible/"
},
{
"title": "blog",
"type": "web_url",
"url": "http://xameeramir.github.io/"
}
]
}
]
}
]
}
Notice that it is mandatory to configure get_started button before setting up the persistent_menu.

Using Facebook Graph API Explorer to publish a custom open graph history

From Graph API Explorer of Facebook I'm trying to publish a story on my wall, without success.
The post was to URL: /2.4/me/my_app_name_space:my_action
with a parameter as: my_object_type : id_of_my_object
The request seems was ok because the response:
{
"data": [
{
"created_time": "2015-08-06T16:09:02+0000",
"title": "My title",
"type": "<my_name_space>:<my_object_type>",
"id": "XXXXXXXXXXXXXX",
"count": 8,
"first_action_id": "XXXXXXXXXX",
"first_time": "2015-09-10T09:42:07+0000",
"last_action_id": "XXXXXXX",
"last_time": "2015-09-11T19:24:38+0000"
}
],
"paging": {
"cursors": {
"before": "YYYYYYYYYYYYYY",
"after": "YYYYYYYYYYYYYY"
}
}
}
Well, I went immediately to my wall but nothing was published.
So I make a GET request to path: /2.4/me/my_app_name_space:my_action/my_object_type and the response contains the previous object.
Does it means the POST query was ok? But then, why the story is not published?
Maybe you're looking for the explicitly shared parameter.
fb:explicitly_shared=true
Further info here:
https://developers.facebook.com/docs/sharing/opengraph/using-actions#explicit

How do I read mentions in fb api?

When I get a certain status in "/{status id}" api call, I get the message stripped from the mentions. How can I read the mentions?
Thanks
the field message_tags will give an array of mentioned users/pages in that post
Example:
"message_tags": {
"13": [
{
"id": "92689703737",
"name": "Tumblr",
"type": "page",
"offset": 13,
"length": 6
}
]
}

Access social readers' posts in a facebook App

How can a facebook app, have access to a social reader's post in the feed? For example, I want to have access to Washington Post's social reader post (when someone else reads an article there and it gets shown up in my news feed) from an app that I am writing. Is it possible to do so, using FQL?
It's easily available in the Graph API (i'll check if it's in FQL)
Basically, either way you'll need to request the user_actions.reads permission from your users. (NB: not user_actions:reads which would be for an app whose namespace is 'reads', for news, music and video apps using the build-in actions there's a special scope)
Then, for the Graph API, just make a call to /USER_ID/news.reads - the response includes the recently read articles from all apps using the built-in 'read' action, example response for my account below:
{
"data": [
{
"id": "REMOVED_ID",
"from": {
"id": "REMOVED_MY_USER_ID",
"name": "REMOVED_MY_NAME"
},
"start_time": "2012-05-10T00:05:10+0000",
"end_time": "2012-05-10T00:05:10+0000",
"publish_time": "2012-05-10T00:05:10+0000",
"application": {
"id": "235586169789578",
"name": "The Independent"
},
"data": {
"article": {
"id": "10150697347986736",
"url": "http://www.independent.co.uk/life-style/food-and-drink/features/the-10-best-scotch-whiskies-1488408.html",
"type": "article",
"title": "The 10 Best Scotch Whiskies"
}
},
"likes": {
"count": 0
},
"comments": {
"count": 0
}
},
.... //more articles