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 5838747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:30:03+00:00 2026-05-22T11:30:03+00:00

Im having a hard time getting Twitter to delete a status using the PHP

  • 0

Im having a hard time getting Twitter to delete a status using the PHP OAuth library.

I am using this same method for posting (OAUTH_TYPE_FORM, and OAUTH_HTTP_METHOD_POST), and it works well.

Here is my code for the Delete reques:

$oauth = new OAuth($twitter['CONSUMER_KEY'], $twitter['CONSUMER_SECRET'], OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_FORM);
$oauth->setToken($access_token['oauth_token'], $access_token['oauth_token_secret']);
$oauth->fetch("http://api.twitter.com/1/statuses/destroy/".$delete_id, NULL, OAUTH_HTTP_METHOD_POST);

I keep receiving a 401 Error. Any help please advise 🙂

  • 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-22T11:30:04+00:00Added an answer on May 22, 2026 at 11:30 am

    Make sure to include the format http://api.twitter.com/version/statuses/destroy/:id.format which can be xml or json.

    $oauth->fetch("http://api.twitter.com/1/statuses/destroy/".$delete_id.".json", NULL, OAUTH_HTTP_METHOD_POST);

    Also, $delete_id should be stored as a string as it might be too large to be represented as an integer properly in PHP.

    ie)
    $delete_id = 68090979596505088765 + ""; instead of
    $delete_id = 68090979596505088765;

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

Sidebar

Related Questions

I'm having a hard time getting my head around this, and Google just isn't
I'm having hard time getting my head wrapped around this one - and it
I'm having a hard time getting the LINQ-syntax.. How can I do this command
I am having a really hard time getting this marshalling down. I have umanaged
I am having a hard time getting this to work file: myclass.hpp Class MyClass
So, I am having a hard time getting this to work. I am trying
I'm having a hard time getting better results on this query: I have the
I'm having a hard time getting this to work in IE. All the other
Having a hard time getting any useful results from various searches on this concept
I'm having a hard time getting the answer for this... Am I able to

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.