TwitterUtils.createStream takes a 3rd argument which is a filter, once you
provide these, it will only fetch tweets of such.

Thanks
Best Regards

On Thu, Jul 30, 2015 at 4:19 PM, Sadaf <sa...@platalytics.com> wrote:

> Hi.
> I am writing twitter connector using spark streaming. but it fetched the
> random tweets.
> Is there any way to receive the tweets of a particular account?
>
> I made an app on twitter and used the credentials as given below.
>
>  def managingCredentials(): Option[twitter4j.auth.Authorization]=
>   {
>       object auth{
>       val config = new twitter4j.conf.ConfigurationBuilder()
>         .setOAuthConsumerKey("****")
>         .setOAuthConsumerSecret("****")
>         .setOAuthAccessToken("****")
>         .setOAuthAccessTokenSecret("****")
>         .build
>             }
>         val twitter_auth = new TwitterFactory(auth.config)
>         val a = new twitter4j.auth.OAuthAuthorization(auth.config)
>         val atwitter : Option[twitter4j.auth.Authorization] =
> Some(twitter_auth.getInstance(a).getAuthorization())
>          atwitter
>  }
>
> Thanks :)
>
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Twitter-Connector-Spark-Streaming-tp24078.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org
>
>

Reply via email to