Possibility on implementating sending Direct message using Twitter API - iphone

I would like to know how to send Multiple Direct message on Twitter. In my app using twitter api, i am able to send Direct message to one( Using DM Syntax ).
Currently i can see some tools like MultiDM website allows to send multiple Direct messages at a time.
So is that possible from iPhone's twitter api?
Also i wonder how the MultiDM website works as such
Pls let me know

In twitter API there is only 1 method of sending a DM: https://dev.twitter.com/docs/api/1/post/direct_messages/new
If you need to send multiple DM's - just call this method multiple times (with different recipient)

Yes you cant send DM to more than one user in a single call of the API.
If you want to send DM to multiple users, just make an array of all users id or screen name and in a loop send direct messages to All through the below API...
https://dev.twitter.com/docs/api/1/post/direct_messages/new

Related

is it possible to get online incoming messages from users in telegram (not bot)?

I need to get all incoming messages from all possible social media and redirect them in one app, using this protocol https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol/, I've read about getting messages in telegram API, but it's possible only with bots.
Have you tried telegram-cli yet?
https://github.com/LonamiWebs/Telethon is a Python 3 library which works both with regular users and bots

From Gmail to Facebook

Is there any way to post messages received in an email, directly as a Facebook post?
If yes, how can I do that?
I want to automate a page in Fb to spend less time there
Yes, one way of doing it would be to create a service or scheduled task which periodically does the following:
Use gmail API to get all unread messages
Each message will have an ID and you are able to check whether it has been read
Use the IDs to retrieve the message bodies
Use Facebook API to post the body data to the page
You can use Ballerina to create a stand-alone program or a service that you can invoke when it's needed. Use the facebook connector to get a list of comments and posts from your facebook page, create a payload string and send it to a destination email using the gmail connector. Look at the samples shipped with the distribution to get a head start.

Facebook Messenger Send Api - send to a big amount of users

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

How to send mass notification to all users who is using my application

i am developing a Facebook application using PHP SDK. According to FB Developer docs, notifications can be send with this metdod;
POST /{recipient_userid}/notifications?access_token= … &template= … &href= …
but This Methot let me send notification to user with "{recipient_userid}" value. But i am trying to send all users a notification. How can i do it?
By finding all members who is using Application and in a loop one by one Notification sending?
thank you for your Help.
I haven't try this yet but i think facebook batch requests is the answer.
https://developers.facebook.com/docs/reference/api/batch/
I frequently have to send notification to all my app users (about 30000 users) and it takes too long. Sending by one by method can't let you send instant notification for all your users, if it works, then it will be also possible.

How to let users send private messages to their friends without a link?

I'm adding a private messaging system to my app,
so users could send private message to their friends.
I thought I could use the send dialog, but the link param seems to be required.
Is there any reason to require that property ?
Is there any other way to send private messages ? (Except XMPP Chat)
Thanks.
No, those are your two only options (send dialog and chat api).
You can also let one user write on the other users wall and set the privacy so that only they can view the message, but that is not really what you're after from what I understand (neither is the chat api btw, since it works only if the two users are online at the time).
I found this thread which talks about it in length: how send message facebook friend through graph api using Accessstoken