1
votes

I am using Twitter REST Api for get my Timeline Tweets. Currently I am using following functions to get Tweets and these are working well.

https://api.twitter.com/1.1/statuses/home_timeline.json

https://api.twitter.com/1.1/statuses/user_timeline.json

Now I want to get filtered Timeline Tweets. I am using both Text search and Location filters with this Link.

https://api.twitter.com/1.1/search/tweets.json?q=[text]&geocode=[lat/lon]

I want get My Timeline Tweets but it returns global tweets.

How can I implement filters on my account?

Do I need to create custom function to fulfill my requirement?

1
You should use twitter search api like: https://api.twitter.com/1.1/search/tweets.json?q=from%3A[username]%20[text]&geocode=[lat/lon] take a look at: link - Kadir
What do you mean by "Timeline Tweets"? - Terence Eden
Timeline Tweets mean Tweets of followers and following. I am fetching these tweets from above mentioned two URLS. - Shoaib Ijaz

1 Answers

2
votes

What you are asking is not possible using standard Twitter APIs.

There are two ways to achieve what you are asking:

  1. You can fetch tweet from timeline and then filter tweets from it in your application. It's the only feasible option.
  2. Other option is to use search using Twitter API and filter out tweets of the people you are following. But this is not going to be feasible option.

I think option 1 is the only thing that you can practically do.