Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6792739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:00:30+00:00 2026-05-26T18:00:30+00:00

What I am trying to do is a twitter bot for retweeting whatever I

  • 0

What I am trying to do is a twitter bot for retweeting whatever I have in my DMbox.
So I need a few things.

  1. I need to follow all the users who follow me. (I did that)
  2. I need to read the DMs( I have to do)
  3. Tweet the DM (I can do it i guess)
  4. Delete the Read DMS(I dont think I wil be able to do it without help)

The problem with reading DMs are I am getting all the DMs at once. How can I tweet it one by one, I mean how I can take one DM from this Response I am getting for “$_GET[‘https://api.twitter.com/1/direct_messages.json’%5D”

Now after retweeting all these DMs how can I delete all of them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:00:31+00:00Added an answer on May 26, 2026 at 6:00 pm

    If you are using the GET direct_messages method provided by the REST API, you can use a combination of the since_id, max_id, and count to request one DM (count) older than (max_id) or more recent than (since_id) some known DM. https://dev.twitter.com/docs/api/1/get/direct_messages

    Here is an example: https://api.twitter.com/1/direct_messages.json?count=1&since_id=1270520569

    After you have grabbed the DM and thus, received it’s id, you can grab your next DM using the above code and delete the current message using the POST direct_messages/destroy/:id method also available through the REST API. https://dev.twitter.com/docs/api/1/post/direct_messages/destroy/%3Aid

    Here is an example of the delete method: https://api.twitter.com/1/direct_messages/destroy/1270520569.json

    To get the first DM that you use to begin your process of retrieving messages, simply use the GET direct_messages with a count of 1 and move either backwards or forwards (max_id or since_id) depending on how Twitter orders the tweets. If they are not ordered by time, you’ll simply have to explore in both directions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to show/hide a users twitter feed when the icon is clicked
I am trying to load twitter link in UIWebview.I have faced NSURLErrorDomain error The
Ok so I am trying to integrate twitter into my iPhone app. I have
I'm trying to reproduce the design of Twitter UITableView (see image below) : Did
I am trying to integrate twitter framework into my app to give the users
I'm trying to integrate Twitter with my App right now. I have successfully set
I'm trying to use Twitter's bootstrap for a quick few pages. I'm having problems
Trying to follow someone on Twitter using new iOS 5 API, getting 406 return
Trying to let users sign in / sign up with Twitter and Facebook. Twitter
I am trying to get twitter updates like this: try { $doc = new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.