Is there a way to get a list of all tweets sent to a twitter user?
I know I can get all tweets sent by the user using api.GetUserTimeline(screen_name='realDonaldTrump'), but is there a way to retrieve tweets to that user?
Use: api.GetSearch(raw_query='q=to%3ArealDonaldTrump')
Related
https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by-username-username
I found this document for getting user info by username, but I want to get media count as well. Can anyone help me how to get it?
Thanks.
This is not available in the Twitter API.
Is there any way to find out when was the last time a user was active, that is, either the last login date or tweet or retweet on Twitter via API? Any activity of a user.
This answer assumes you're watching a known list of Twitter users.
Pretty sure that you are not going to see the login date/time. If you request the user's tweets from the user's timeline, then those tweets are sorted by date/time (GET on https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&include_rts=true). You might need to set include_rts to true in order to get back retweets. The time of the latest tweet gives you the time of the last activity.
Additionally you can add trim_user=true to keep the payload smaller.
Notice that those requests do count into the rate limit count. You can do bulk requests by using the users/lookup request, which lets you query up to 100 users with one request, which is more rate-limit-friendly.
Reference: https://dev.twitter.com/rest/reference/get/statuses/user_timeline
I have the Twitter API installed into a Rails app via this brilliant gem: https://github.com/sferik/twitter. I've been posting some test tweets on my feed and all was fine until I realized that I need to also grab the tweet that is sent out and display it on the site.
Use case: When a user signs up, a tweet is sent out. I'd like to display the tweet that was sent out so that they know they've been tweeted.
Is there anyway I can get the id of a tweet when I do $twitter_api.update(new_user_tweet)?
new_user_tweet would be "We are glad to welcome user12450 to the party!". You get the idea.
On my website I have placed a tweet button. I want to allow Users to Tweet certain content.
So if a user clicks the Tweet Button and tweets - I want to save the Tweet ID in my database.
How do I get the response from Twitter
that the Tweet was successful
what the Tweet id is
Sorry, no clue how to do that. Any Tips where to start?
I managed to log a user in using OAuth. Then I can retrieve all the user's contacts by calling http://social.yahooapis.com/v1/user/me/contacts?format=json&count=max.
But I can't find a way to get the user's own email address. How can I get it?
I ended up using OpenID+OAuth in order to get the user's info with OpenID and the user's contacts with OAuth:
http://developer.yahoo.com/oauth/guide/openid-oauth-guide.html