Callback when Twitter Retweet - twitter

I am new to using twitter streaming api.
I want to allow users to tweet from my application a text . And then if some body retweets that, i want to get notified.
If there are thousands of users who tweeted from my app, i need to know if somebody retweeted for each of their tweet.
Do we need to do constantly search for each users tweet id using streaming api to see if there are any retweets. ?
For this to happen , should i user give permission for my twitter app so we can see if any retweets

Related

Why twitter stream api sends unnecessary data?

As per twitter documentation
A comma-separated list of user IDs, indicating the users whose Tweets should be delivered on the stream. Following protected users is not supported. For each user specified, the stream will contain:
Tweets created by the user.
Tweets which are retweeted by the user.
Replies to any Tweet created by the user.
Retweets of any Tweet created by the user.
Manual replies, created without pressing a reply button (e.g. “#twitterapi I agree”).
Imagine I am following person X, he/she has millions of follower and whenever he/she tweets something a lot of followers retweet that, as per documentation streaming api will stream all that noise if I am following that id via twitter api. So my question is, is it just bad design or any specific for reason for that.
It's a design choice.
You're looking at a specific method of filtering Tweets (using the follow parameter). If what you want is just the Tweets posted by that user, you could use a different pattern like the from: operator.

Twitter API - Get id's of all users that interact with a tweet

Is there a way in the Twitter API v1.1 to get the id's of all the users that replied, favorited and retweeted to a particular tweet using its id?
I've searched in older posts but I didn't find an simple way to do it.
Thanks
According to Twitter Staff Episod,
It's not possible with the API after the fact for a tweet that has more than 100 retweets. You would need to collect them in real time as they happen to collect them all. The Streaming API is the best bet for tracking such things.
So, you can only get 100 Retweets ID of a tweet through REST API. Move to Streaming API to get all the Retweets ID but you can't get the past data. You can only get data in Streaming API from present - to - future.

Knowing if an account had tweeted

Background info:
My website has an account system and we wanted to give the accounts "reward points" everytime they tweeted / facebook share.
For facebook share, we are able to track which account had shared by using the redirect_uri and redirect them back to our site (with the specified url) and noting it. https://developers.facebook.com/docs/reference/dialogs/feed/
Is there such thing on twitter as well? I had been trying to find real hard but i can't find a way for me to inform my system that a certain account had tweeted.
Thanks!
One of the basic objects in the Twitter API is the User object, which gives you a decent amount of information about the user in question. Once of the properties of the User object is called "status", which is a Tweet object, which is the user's most recent tweet.
So, in your application, you could store the unique identifier and date/time of the user's last tweet. Then at an interval of your choosing, you could get the information about the user and see if the ID of their most recent tweet matches what you have in your database. If it does not match, then the user has posted a new tweet.
Twitter API documentation of the User object
Twitter API documenation of the Tweet object

Get tweets a specific account retweeted?

I was looking at the twitter API, and I couldn't tell if the api allows you to pull your tweets that others have retweeted, or tweets you retweeted. What I'm trying to do is pull in the most recent tweet an account retweeted. I figured if the retweet api didn't do this I could just pull in the timeline and loop through until I reach the last retweet?
These calls will help:
Returns 20 of the most recent retweets posted by the authenticating
user http://api.twitter.com/1/statuses/retweeted_by_me.json
Returns 20 of the most recent tweets of the authenticated user that
have been retweeted by others
http://api.twitter.com/1/statuses/retweets_of_me.json
Returns 20 of the most recent retweets posted by the authenticating
users friends http://api.twitter.com/1/statuses/retweeted_to_me.json
Each works for your own account.

Twitter api and retweets

I'm trying to get the last tweet from the people I follow using the twitter api (http://api.twitter.com/1/statuses/friends.json&screen_name=[username]), but I noticed that if the user's last tweet is a retweet, the json data does not contain a "status" element.
Using the "user timeline" api does not work either, the last tweet is the last non retweeted tweet.
Is there a way to get the real last status, even if it's a RT, through the twitter API?
This was addressed recently by the Twitter devs. You can now add a include_rts=true to your call to user_timeline. See the full discussion here: http://groups.google.com/group/twitter-development-talk/browse_thread/thread/7a4be385ff549ed0

Resources