How do I begin using the API?


#1

Hello,

I would like recommendations, I have tried youtube, but the videos go all over the place, now the oauth is 2.0 So the clips are dated.

Thanks.


#2

Need more specifics. What programming language?


#3

Pick a library. Diff twitter libraries are in diffrent languages. The libraries themselves use twitter api calls and convert them to work with particular languages…

So for example if you want to code a twitter bot in python than use tweepy because tweepy converts the python code to communicate with the api to accomplish any tasks you want it to do.


#4

Hi, well I tried a youtube tutorial using Php, but the examples files are missing to gather some tweets. autoload.php for example.


#5

For PHP I recommend: https://twitteroauth.com/


#6

Hi there,

Thanks, I followed a tutorial on youtube which explained what to do to get it working, but the php index doesn’t display for me. I am using a free web host, not sure what could be the problem to getting a list of messages from my profile.

I guess you haven’t used the php setup? Yes you actually are using php.


#8

I moved the index page out of the folder, but there is an error with Fatal error: Uncaught Abraham\TwitterOAuth\TwitterOAuthException: Connection timed out after 5001 milliseconds

What is exactly is this problem?

Thanks.


#9

These questions are very specific to the language and environment you’re trying to use - they are not specific to the Twitter developer platform in general.


#10

Hi,

I tried youtube and a search engine, I felt I should try here, and see what response I could get, somebody may of had this error at point. I don’t know what the solution is to this. It was worth a try.

Thanks.


#11

Instructions in increasing the timeout on TwitterOAuth are at the bottom of https://twitteroauth.com/


#12

Hello Abraham, your the creator of this package.

$connection->setTimeouts(10, 15); So what is 10, 15 suppose to mean? I added this in, and I don’t even get an error, but a time out entirely.


#13

As documented on twitteroauth.com

The first parameter corresponds to the timeout for the connect phase and the second to the maximum time the request is allowed to take.

The first number is how long it will allow creating a connection to the remote server. The second number is the total amount of time allowed to get a response.


#14

Hello,

I tried the page again, and now a return of this Fatal error: “Uncaught Error: Class ‘TwitterOAuth’ not found”

“htdocs/index.php:15 Stack trace: #0 {main} thrown in”

“index.php on line 15”

The page with that name is in the folder, and the index is outside of it. The twitteroauth.php file was in the src folder, so whether it is there or outside, doesn’t change the error.

Thank you.