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

  • Home
  • SEARCH
  • 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 917249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:10:53+00:00 2026-05-15T18:10:53+00:00

Found out today that Twitter will be discontinuing its basic authentication for its API;

  • 0

Found out today that Twitter will be discontinuing its basic authentication for its API; the push is now towards OAuth but I don’t have a clue as to how to use it or whether it’s the right path for me.

All I want to be able to do is post a tweet linking to the most recently published post when I hit publish. Currently I’m sending the login credentials for my Twitter account as plaintext, which I realise isn’t that secure but as my site is fairly small it isn’t an issue at least for now.

I’m using this basic PHP code:

$status = urlencode(stripslashes(urldecode("Test tweet")));
$tweetUrl = 'http://www.twitter.com/statuses/update.xml';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "$tweetUrl");
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, "status=$status");
curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($curl);
$resultArray = curl_getinfo($curl);

if ($resultArray['http_code'] == 200)
{
    curl_close($curl);
    $this->redirect("");
}
else
{
    curl_close($curl);
    echo 'Could not post to Twitter. Please go back and try again.';
}

How do I move from this to an OAuth system? I’d greatly appreciate any tutorials/advice. Thanks in advance.

  • 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-15T18:10:53+00:00Added an answer on May 15, 2026 at 6:10 pm

    I found this page/script useful when I implemented OAuth for Twitter: http://www.jaisenmathai.com/blog/2009/04/30/letting-your-users-sign-in-with-twitter-with-oauth/
    I’m sure you can get this from the page I linked to, but the code I use with this class for my page is

    $twtrObj=new EpiTwitter($consumer_key, $consumer_secret);
    $twtrObj->setToken($tok, $sec);
    $status="I just submited new artwork! http://gravityprops.com/dragonart/artwork?action=view&id={$id}";
    $update=$twtrObj->post_statusesUpdate(array('status' => $status));
    $tmp=$update->response;
    

    with $tok and $sec being the token and secret for any specific user which I pull from the database. The $consumer_key and $consumer_secret are declared in a separate file which are included (in the same fashion as on the page I linked to). I put all the files I need in my PHP include folder so that only PHP can access it.

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

Sidebar

Ask A Question

Stats

  • Questions 492k
  • Answers 492k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, that will definitely reset the value. You need to… May 16, 2026 at 10:23 am
  • Editorial Team
    Editorial Team added an answer Looks like pd_stack_dump_tomem starts its index at stack size and… May 16, 2026 at 10:23 am
  • Editorial Team
    Editorial Team added an answer It sounds like you are trying to accomplish something made… May 16, 2026 at 10:23 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Today I found out that putting strings in a resource file will cause them
We found out today that for two of our customers, JavaMail is not authenticating
Today, I found out that you can write such code in C++ and compile
Today I found out about an interface I'd never heard of before: IGrouping IEnumerable<IGrouping<YourCategory,
Today only I have noticed and found out the importance of using === operator.
I found out that someone spyware on my server and the spyware infected all
Today I noticed that a few Google advertisements in an adsence block on one
Question: Today I worked with MS Visual Sourcesafe, that is to say Microsoft's Sourcecode
I have a ListBox that uses a WrapPanel for its ItemsPanel , a custom
I have the following PHP code that checks if an email is valid: if

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.