J7mbo / twitter-api-php

The simplest PHP Wrapper for Twitter API v1.1 calls
MIT License
1.82k stars 802 forks source link

[Off topic] Is this library still active? #245

Closed ErikThiart closed 6 years ago

ErikThiart commented 6 years ago

Hello is this still the correct API I see it is PHP version 5.3.10 which is old.

ErikThiart commented 6 years ago

In fact, it does not seem to work anymore.

public 'code' => int 32 public 'message' => string 'Could not authenticate you.'

EwenH commented 6 years ago

Hi @ErikThiart, The project is still active and works exceedingly well for the majority of the Twitter API methods (there might be an odd new method not covered) altough I Have yet to use it on PHP 7

ErikThiart commented 6 years ago

I am struggling a little bit I tried both php 5.6 and php 7 still get that "could not authenticate you" I have SSL setup in wamp etc.

This is the example I tried:

$url = 'https://api.twitter.com/1.1/search/tweets.json'; $getfield = '?q=#nerd'; $requestMethod = 'GET';

$twitter = new TwitterAPIExchange($settings); $response = $twitter->setGetfield($getfield) ->buildOauth($url, $requestMethod) ->performRequest();

var_dump(json_decode($response));

From here: https://github.com/J7mbo/twitter-api-php/wiki/Twitter-API-PHP-Wiki I did this: https://stackoverflow.com/questions/12916539/simplest-php-example-for-retrieving-user-timeline-with-twitter-api-version-1-1/15314662#15314662

EwenH commented 6 years ago

Have a look at a number of other closed threads for CURLOPT_SSL_VERIFYHOST and see if this fixes your issue. Whilst you should verify the host always, you may need to reload your certs file. Alternatively have a look at one of the test scripts which work well under 5.6

J7mbo commented 6 years ago

It works and exists because a lot of people require 5.3 support and an extremely simple set of methods :)

J7mbo commented 6 years ago

Closing this as no response. If this is not the case and there's still a problem, please feel free to re-open / create a new issue.