Closed

Simple PHP script to fetch Twitter user data

This project was awarded to metrixmedia for £60 GBP.

Get free quotes for a project like this
Project Budget
£20 - £250 GBP
Total Bids
14
Project Description

Write a script to retrieve user data from Twitter. The script will first require the user to login via their Twitter account, then A) retrieve user data from five of the user's followers and B) retrieve user data from five followers of another randomly selected Twitter user. So the output will be two lists, each containing five Twitter users.

Here is a pseudocode to help explain the script:

// Require user to login via unprotected Twitter account

if (not logged in) { // Please login }

else

{

// Logged in

// User = "User A"

if (account protected) { echo "Sorry, you need an unprotected account to use this service"; }

else

{

// Display @username and Twitter ID (number) of "User A"

// echo "User A: ".$username." (".$twitterid.")";

// Task A:

// Fetch 5 random Twitter users (with unprotected accounts) who follow "User A"

// (if "User A" has less than 5 unprotected followers, fetch any 5 random Twitter users with unprotected accounts)

// For each of of these 5 Twitter users, fetch and display:

// Twitter ID (number)

// @username

// Name

// Tweets

// Following

// Followers

// Listed

// Date Joined

// Avatar

// Verified

// Fetch 1 random Twitter user (any Twitter user whose account is not protected)

// User = "User B"

// Display @username and Twitter ID (number) of "User B"

// echo "User B: ".$username." (".$twitterid.")";

// Repeat Task A for "User B"

// Example output:

/*

User A: @JohnSmith (1234567890)

@Follower1 (3493243984)

John Smith

Tweets: 10,420

Following: 249

Followers: 588

Listed: 29

Date Joined: 29-11-2010

Avatar: [ IMG ]

Verified: No

@Follower2 (3493984722)

David Jones

Tweets: 7,990

Following: 1,205

Followers: 717

Listed: 12

Date Joined: 03-08-2011

Avatar: [ IMG ]

Verified: No

@Follower3 (7349471088)

Richard Adams

Tweets: 34,664

Following: 121

Followers: 13,908

Listed: 44

Date Joined: 04-12-2009

Avatar: [ IMG ]

Verified: Yes

@Follower4 (9632490349)

Sarah Biscuit

Tweets: 8,209

Following: 809

Followers: 1,084

Listed: 102

Date Joined: 24-01-2012

Avatar: [ IMG ]

Verified: No

@Follower5 (1010391279)

Laura McBain

Tweets: 412

Following: 188

Followers: 34

Listed: 0

Date Joined: 19-01-2013

Avatar: [ IMG ]

Verified: No

(repeat for User B)

*/

}

}

Awarded to:

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online