Hello everybody ?
Can someone help me to understand (explaine me) how to creat a Twitter both with the oAuth api and a webserver ?
Thank you 😑
Jun 1, 2017 04:07 PM
(This post was last modified: Jun 1, 2017 04:10 PM by Vezel.)
Edit:
Didn't see that you where asking about PHP
I could be 100% off here, but I think that PHP is the wrong language for this kind of bot?
I would say python or something is better.
Anyway the steps of doing it is really simple ( dosn't require much code in most languages )
1. Check for new posts
2. If new posts -> retweet them
3. Repeat
Use the twitter lib. You could make this in an afternoon without Php experience.
you have Chrome Plugin do that :) you can search in Chrome Apps > Twitter auto follow or somethink like that or auto retweet
https://dev.twitter.com/rest/reference/g...rch/tweets
'Make a limit of 50 (in case there is multiple tweets to retweet)
Make a function that calls this API, store in a json file, the ID of your last tweet.
Loop into the results of the api response, if the ID is biger than the one you stored in your json file, retweet them.
At the end of the loop, don't forget to change the value of your json file to the new last ID.
If you are a user-auth, you can call your function every 5 secondes (only if your file is on a server and executed only by the server once each 5 seconds, otherwise it will exceed the rate limit)
Elseif you are a app-auth, same as above except that you can call your function every 2 seconds.
“Whatever Your Mind Can Conceive and Believe, It Can Achieve.” – Napoleon Hill
first of all, I've done it as long time but in " Visual basic .net " With httpweRequest and httpwebresponse points.
but never try to do it with PHP, here is the step:
1- Create connect with " Twitter " and Send Request with " GET " Method to " mobile.twitter.com " 'it's easy to read response with JSON systems.
2- save request session " Cookies, Tokens, And others.... " in variables ' maybe you will need it later .
3- send request with " POST " method to " mobile.twitter.com/login " and fill all important Information like auth-token or cookies session, you'll get it from STEP-2 in variables .
if login get as success then you can catch " Send tweet " connect headers, for example in Firefox install " Live HTTP Headers " and watch All requests connection.
Jun 6, 2017 02:12 AM
(This post was last modified: Jun 6, 2017 04:51 AM by +Haze.)
You're crazy if you think you're going to make a retweet bot using twitters official API
You're even crazier if you think PHP is a suitable language to design bots in
(Jun 6, 2017 02:12 AM)+Haze Wrote: You're crazy if you think you're going to make a retweet bot using twitters official API
You're even crazier if you think PHP is a suitable language to design bots in
Their API is great for this. I've done it for years in both PHP and Java.
DO NOT DEAL WITH THIS MEMBER
I actually made an auto retweet bot in PHP that searches for "retweet for a chance to win" contests and enters them. Here's the link:
gist(dot)github(dot)com/RonSkons/02978ca7325f767350d8
(Jun 6, 2017 06:41 AM)Charger Wrote: Their API is great for this. I've done it for years in both PHP and Java.
I think we probably have different ideas of a twitter bot and we both probably not talking about the same type of API
(Jun 6, 2017 08:14 AM)+Haze Wrote: I think we probably have different ideas of a twitter bot and we both probably not talking about the same type of API
I am taking about their REST API.
https://dev.twitter.com/rest/reference/p...retweet/id
Thank you, yes exactly I was thinking about the Api REST. I want to have multiple auto Twitter account and now I don't think the Api REST can do the work. Have any idea ? The account need to RT/FAV some twitts and follow some accounts
(Jun 27, 2017 10:10 AM)SIM-1625576 Wrote: Thank you, yes exactly I was thinking about the Api REST. I want to have multiple auto Twitter account and now I don't think the Api REST can do the work. Have any idea ? The account need to RT/FAV some twitts and follow some accounts
yea, your probably going to need a different language, I suggest c#, or anything with a nice thread pool. You can do it in PHP but really, apache doesn't need the abuse.
look into a desktop language for this.
(Jun 27, 2017 10:10 AM)SIM-1625576 Wrote: Thank you, yes exactly I was thinking about the Api REST. I want to have multiple auto Twitter account and now I don't think the Api REST can do the work. Have any idea ? The account need to RT/FAV some twitts and follow some accounts
The API can do it just fine.
|