You can create a custom receiver and then inside it you can write yourown
piece of code to receive data, filter them etc before giving it to spark.

Thanks
Best Regards

On Thu, Jul 30, 2015 at 6:49 PM, Sadaf Khan <[email protected]> wrote:

> okay :)
>
> then is there anyway to fetch the tweets specific to my account?
>
> Thanks in anticipation :)
>
> On Thu, Jul 30, 2015 at 6:17 PM, Akhil Das <[email protected]>
> wrote:
>
>> Owh, this one fetches the public tweets, not the one specific to your
>> account.
>>
>> Thanks
>> Best Regards
>>
>> On Thu, Jul 30, 2015 at 6:11 PM, Sadaf Khan <[email protected]>
>> wrote:
>>
>>> yes. but can you please tell me how to mention a specific user account
>>> in filter?
>>> I want to fetch my tweets, tweets of my followers and the tweets of
>>> those  whom i followed.
>>> So in short i want to fatch the tweets of my account only.
>>>
>>> Recently i have used
>>>        val tweets
>>> =TwitterUtils.createStream(ssc,atwitter,Nil,StorageLevel.MEMORY_AND_DISK_2)
>>>
>>>
>>> Any response will be very much appreciated. :)
>>>
>>> Thanks.
>>>
>>>
>>> On Thu, Jul 30, 2015 at 5:20 PM, Akhil Das <[email protected]>
>>> wrote:
>>>
>>>> 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 <[email protected]> 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: [email protected]
>>>>> For additional commands, e-mail: [email protected]
>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to