PHP Classes

Twitter SSL

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement PHP ...  >  All threads  >  Twitter SSL  >  (Un) Subscribe thread alerts  
Subject:Twitter SSL
Summary:Twitter oauth stopped working
Messages:7
Author:Dirk Vandycke
Date:2014-08-21 18:52:06
 

  1. Twitter SSL   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2014-08-21 18:52:06
Hi Emanuel,

My app started receiving 403 responses since July 29th.
When looking at the dev.twitter.logs, this is what changed that day:

dev.twitter.com/docs/security/using ...

So I THINK it might have to do with that.

How can I make your api use SSL (I thought it did), without breaking anything (I don't want to mess around)

Kind regards
dirk

  2. Re: Twitter SSL   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-08-21 20:26:15 - In reply to message 1 from Dirk Vandycke
That is a matter of the URL you are passing to CallAPI. It must use https. If you are still using http, just change it to https.

  3. Re: Twitter SSL   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2014-08-21 20:34:27 - In reply to message 2 from Manuel Lemos
Hi Emanuel,

All worked just fine until July 29th. Everything is https (that's why I don't understand what's going on all of a sudden)

but on this page:
dev.twitter.com/docs/security/using ...

they state "Using OAuth isn't enough"

I'm very sorry to bother you because your APi works fine and took a lot of the burden of my implementing task. I'm definitely no oauth expert.

Perhaps I should mention that I'm still using veriosn
v 1.59 2013/05/25 11:36:53 mlemos

But again, it worked fine until the dat the article abov was posted by Twitter. I tried updating to your last verions, but then Stocktwits didn't work anymore :-s

  4. Re: Twitter SSL   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2014-08-21 20:56:52 - In reply to message 3 from Dirk Vandycke
When I was testing the latest version, running my php not from a cron job but by calling it in a browser, one isolated update got through to the twitter stream, the rest didn't.
All I did was refreshing the browser a few times (I didn't change any code).
Very strange ...

  5. Re: Twitter SSL   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-08-22 00:53:37 - In reply to message 3 from Dirk Vandycke
I tested the example script for Twitter in PHP 5.4.20 and it works without problems.

If you are using an old version of the class, you should upgrade because that may be the reason for your problems.

I also tried the example StockTwits and it works flawlessly.

Keep in mind that sometimes APIs fail temporarily and your scripts should be ready to deal with the failures.

If your scripts stopped working permanently, I need to know the exact API call you are performing and the error messages you are getting, so I can try to reproduce your problem.

In that case try enabling the debug options of the class and if possible post here the PHP error logs so I can see what may be wrong.

  6. Re: Twitter SSL   Reply   Report abuse  
Picture of Dirk Vandycke Dirk Vandycke - 2014-08-22 15:37:26 - In reply to message 5 from Manuel Lemos
Hello Manuel,

I saw this in the response:
"This request looks like it might be automated. To protect our users from spam and other malicious activity, we can't complete this action right now. Please try again later."

Is it possible that all of a sudden Twitter blocked the app (or something like that). It wasn't aggressive at all (it posted about 30 updates a day and had already 800+ followers).

Nevermind if you don't know. Seems that things work fine from your library.

cheers
Dirk

  7. Re: Twitter SSL   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-08-22 21:04:30 - In reply to message 6 from Dirk Vandycke
You may have exceeded Twitter API call rate limits:

support.twitter.com/articles/15364- ...