Skip to content
Snippets Groups Projects
Commit 8955787a authored by James Phillpotts's avatar James Phillpotts
Browse files

Twitter API v1 is retired - username/password auth no longer possible

parent 93a16434
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ import org.apache.hadoop.mapreduce.{InputFormat => NewInputFormat}
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat
import org.apache.hadoop.fs.Path
import twitter4j.Status
import twitter4j.auth.{Authorization, BasicAuthorization}
import twitter4j.auth.Authorization
/**
* A StreamingContext is the main entry point for Spark Streaming functionality. Besides the basic
......@@ -361,20 +361,6 @@ class StreamingContext private (
fileStream[LongWritable, Text, TextInputFormat](directory).map(_._2.toString)
}
/**
* Create a input stream that returns tweets received from Twitter.
* @param username Twitter username
* @param password Twitter password
* @param filters Set of filter strings to get only those tweets that match them
* @param storageLevel Storage level to use for storing the received objects
*/
def twitterStream(
username: String,
password: String,
filters: Seq[String] = Nil,
storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_SER_2
): DStream[Status] = twitterStream(new BasicAuthorization(username, password), filters, storageLevel)
/**
* Create a input stream that returns tweets received from Twitter.
* @param twitterAuth Twitter4J authentication
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment