/twiproj

Twitter-Timeline Challenge

Primary LanguagePHPMIT LicenseMIT

Twitter-Timeline Challenge

This twitter challenge includes use of twitter api for fetching details like user's home Timeline, user's 10 followers list and their tweets, A download section to download Any twitter user's followers list, you will get followers data through Mail, Due to twitter rate limit Directly it is not posiible to download Followers data.

Getting Started

First thing you need a developer Account to use twitter API(update july 2018) so If you don't have one:

It will take up to two weeks or more (For me duration was 12 days) , then only they permit you to Create App.

Prerequisites

  • Twitter developer Account And create a App
  • A decent server to host your site(Because twitter callback url not supports localhost, if you still want to do it then change your host file from system drive)
  • Read about background jobs in linux or php

Installing

Copy Your API keys and other parameters:

path config/config.php

And set your cronjob path:(Path is Different For some servers check with your hosting service, current demonstration of GoDaddy Hosting service)

My original Script not Supports on GoDaddy but Here you can check Output Of it

60,494 followers data of a famous personality:

https://drive.google.com/open?id=14E0vR9YdR2Yp6NqnhYgkqdTLcWGFeBZZ

Running the tests

For automated testing of the system, I used scrutinizer-ci To maintain standards 155 patches has been done.

Manually i didn't get Time to Test system properly , So Feel Free to raise Any issue.

Deployment

You can deploy it easily on any server Things to Keep in mind:

  • Check your hosting service Cronjob path and supports
  • Check your hosting services Mail or phpmailer Host And ports

For Example

GoDaddy have some Strict Rules Related Phpmailer or mail function:

   $mail->IsMail();
   $mail->Host = 'relay-hosting.secureserver.net';
   $mail->Port = 25;
   $mail->SMTPAuth = false;
   $mail->SMTPSecure = false;
   $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
   $mail->IsHTML(true);
  • Hope this could save someone's One or Two hour.
  • Try Testmail.php To send a test mail.

Built With

  • PHP 7
  • JS & jquery-1.9.1
  • css
  • Ajax
  • some shell part

Contributing

If you are Applying for this same twitter Challenge , I advice you to not copy or use my code, Be honest. I will not be Accountable of Any misguided use or unauthorized copy of this code

Feel Free to Raise Any Issue , Feel Free to Use Code , Also let me know If you created Something Cool From This code, i will be glad to now , Mail me at :

niraj.visana@gmail.com

Versioning & Updates

This is First Version so Update to be done And Future Fixes Includes:

  • I will properly write script to download followers, this one is temporary script Original Script is not supports on GoDaddy, i will update it later.

  • I've written Code to download followers list in xml,json,excel but i commented that because it's not tested yet.

  • Do not put '@' in Textbox while Entering Handler And code will verify your inputed handler so if entered handler is invalid , it will not gonna start a job.

  • In this version i didn't code for followers searchbox because if user's numbers of followers are high then looking for result was taking time , untill i find a optimal solution it's on hold.

  • This version is not responsive.

Tools:

  • Sublime Text Editor
  • Putty client
  • scrutinizer-ci
  • Browser::FireFox developer edition

Dev:

All Men Must Die.

Acknowledgments