I'd like to use the endpoint '{conversation-id}/messages' to send bulk messages. According to the latest update on policies i can send 1 message to each user (says nothing about the users count) outside the 24 hours window ( when i can send multiple messages ).
Can anyone confirm to me that "The restriction on promotional content has been removed for standard messaging." includes the Api endpoint i stated above? is it standard as in non-'bot-like'? or standard as in using the web app ?
Also, if i break the policies in this regard, do they ban the app, the developer or the page?:D
Related
What are the details of your problem?
Until recently, in my own web application, I used the Gmail API to retrieve Google Chat messages as follows.
I was able to get it from "Label: CHAT" by executing as follows.
(1) Acquisition of thread ID belonging to CHAT label
https://gmail.googleapis.com/gmail/v1/users/me/messages?labelIds=CHAT
(2) Get message information from thread ID
https://gmail.googleapis.com/gmail/v1/users/me/threads/[Thread ID]
However, it seems that it has been impossible to obtain it since around December 2022, and when I searched for "in: chats" in Gmail, the messages after December 10th were not displayed.
Any method is fine, so I would like to be able to get Google Chat messages as before.
Anyone know the cause and solution?
Please check.
I also tried using the Google Chat API to see if it was possible to get messages, but I could only get messages in the space, and I couldn't get direct messages, so I wasn't able to use it.
I checked all the messages in the labels that can be obtained at "https://gmail.googleapis.com/gmail/v1/users/me/labels", but it seems that chat messages are not included.
Also, in another answer, there was a description that the state included in the Gmail API was a bug, so it is possible that this bug was adapted and it was not displayed, but in that case, there is another way to deal with it. Are you there?
Access CHATS label with Gmail API
I would like to know that we are having a lead generation campaign running on Facebook but few of the times our staff isn't available to answer the query on Facebook messenger, so based on that short-coming I am thinking to devise a mechanism that "If within 1 hour of user's message no one replies to him then an automated BOT message should get sent to him."
Please don't deprecate this question as it is based entirely on knowledge. And if perhaps someone has hints or links on how to achieve this thing then I will really appreciate it.
Thanks.
Some options:
You can query your /conversations edge every X minutes to detect when there is a message from a user which has not been replied to, then you would send the automated message using Send API.
https://developers.facebook.com/docs/graph-api/reference/v10.0/conversation
https://developers.facebook.com/docs/messenger-platform/reference/send-api/
You can use webhook data for incoming messages to create a task that will run at received_time + 60 minutes, find the thread in your conversations edge based on PSID and then check if there has been a reply
Alternatively you can check out Handover Protocol which allows a Page to simultaneously use a Messenger Bot and Live chat agent to handle messaging
https://developers.facebook.com/docs/messenger-platform/handover-protocol/
I have a bot over Facebook which people are subscribing for sports updates.
I have 1,000 - 10,000 users I want to send out an update to.
Currently, in small scales like 20 messages , I would use a Facebook Batch request.
But, i'm not sure what would be the best way to send my messages in a large scale.
My two options are:
Batch - limited to 50 requests per batch request.
I don't really know if I should expect a delay in the execution of the request.
Regular calls - I will iterate through my receivers and send each of them a message separately.
I'm afraid Facebook might block me for thinking i'm spamming, or I will exceed the rate limits.
I have to say I was expecting a more generic method coming from Facebook since they are allowing users to subscribe for update through my bot, hence, I was expecting them to provide a guide on what are the best practices for sending the update users subscribed for.
You should definitely use Facebook Messenger Broadcast API for this. This will broadcast your message to all user subscribed to the bot.
Caveats:
You have to apply for this permission. (pages_messaging and pages_messaging_subscriptions.Takes about 1-2 days, but
can test on Admin/Test users of the app)
Each broadcast has to be a separate broadcast. (e.g. you can't send image and a text together, each has to be its own individual broadcast).
Have some kind of un-subscription option as well. FB user might think you are spamming even if you clearly say in the messages that your bot will send updates.
Use custom labels to create targetted sends. So you can either subdivide who you will send updates to about specific issues or just label people if they unsubscribe to your broadcast or not.
Basic workflow:
Get permission to broadcast.
Create message_creative_id via POST to endpoint
Use message_creative_id to POST a broadcast_messages
On a successful send you will get back broadcast_id
I am looking for a way to automatically send SMS updates when a Facebook page is reaching a certain like count. I want to know when https://www.facebook.com/Foodler?ref=stream&fref=nf is nearing 100,000 likes automatically via SMS. Is this possible?
Ok, you have to break down your tasks. These are 2 separate concerns.
1 Track Facebook page constantly for likes
You can get this information by using Facebook's Graph API as a JSON record. A simple call (without requiring any API key will do the job)
http://graph.facebook.com/Foodler/
Right now, the "likes" key has value 97542
You can possibly run a cron-job or Scheduled Task (depending on your server type/configuration) to run a script (PHP/ASP/.NET, etc.) which further runs this API call every "X" minutes (or hours or days, whatever you wish) and parses the "likes" returned. Once they are >= 100,000, you can now send SMS using this script.
Your script can do so by now calling the SMS Gateway's API.
2 Sending SMS
You need an SMS Gateway (preferably a simple API?) for doing that. Just a simple google search for "sms gateway" returns many leading ones.
Now i am able to get "Received Direct messages" from twitter and "Sent Direct messages" from twitter.
But i saw an iPhone application Seesmic where direct messages showing as original twitter messages page (Messages). In that iPhone application they showing both sent and received messages in single page.
I could do this by calling both webservices (http://api.twitter.com/version/direct_messages/sent.json,http://api.twitter.com/version/direct_messages.json) and merging both responses and showing it like original twitter inbox (means showing messages to each user as a separate page).
There are only four methods in Twitter Direct Messages
I want to know any other way of getting complete "Direct messages" from twitter in a single request.Is Streaming api is capable of that. There is no enough support in web for streaming api. Please answer me.Thanks in advance.
There is no single API method that provides this. You will have to make two requests and merge them locally. You could use the User Streams API but the streaming API does not provide any historical data. You would start with no DMs and slowly build up a local cache as DMs are sent/received by the user.