Since 20 November, its' not possible to get Twitter share counts in this way:
http://cdn.api.twitter.com/1/urls/count.json?url=
Is there alternative to do that or it's not possible? Thanks.
Check out http://opensharecount.com, it provides a drop-in replacement for that URL. Only downside is it only can 'see' tweets from up to seven days ago, but it will include those in future counts so it is a good way to get approximate counts for your new posts.
Related
I have a small program that fetch tweets and displays them in google maps, it works perfect but I would like to know if there is a way to put a timeframe, for instance lets say I would like to fetch the tweets written in the last 4 hours, is it possible? Thanks for your help!
The program is written in PHP and javaScript.
It may be possible using the max_id and since_id parameters. How you would calculate finding an ID within that 4 hour window, I am unsure, but this post might provide some answers: https://stackoverflow.com/a/6416836/5884189
I just coded a solution to the same problem in a similar question. Check the answer and change the WINDOW constant to 4 to get the tweets in the last four hours. Good luck!
PS: I think the mods don't want you to repeat similar answers in 2 questions so I let you the link, but I could edit the answer later and paste the code here if I'm wrong.
Let's say I need to obtain the text (post and all comments) from the sub-reddits that were most popular during December 2014 and January 2015. How can that be done using PRAW? I was wondering, just like Twitter doesn't let us crawl tweets which are more than a week old, is there any such time constraint in place in case of Reddit?
PRAW has a limit of 1,000 for how far back you can get threads from a subreddit based on score, newness, "hotness" (I'm not sure if that one still works) or "controversy" (I haven't tried that one in a while, as well). Unfortunately, the most popular subreddits have had too many posts to look that far back.
You can try using search() http://praw.readthedocs.org/en/latest/pages/code_overview.html#praw.init.UnauthenticatedReddit.search to get the values you want, but it requires a bit more work.
Good evening, StackOverflow!
I am working with twitter API to retrieve tweets from the twitter. I need to receive tweets by a time range, for example, all tweets from #someUser for the last week, or last 10 days... or from March to April.
I am looking at https://dev.twitter.com/rest/reference/get/statuses/user_timeline documentation, and it doesn't really specify how to use the date to narrow down the list of receiving tweets. I mean, I can use since_id or max_id, but it is not really what I'm looking for.
I mean, I can receive tweets by one using max_id and since_id, check the date, and see if it falls into my time frame, and continue until I get to the edge. Anyway, it is not a good practice.
So, is there a way or maybe I missed something in the documentation?
I really would appreciate any help (just a tip would work).
I can't quite believe this, but seems there's no way to get tweets from a particular user from a particular timeframe. Is this true? is there a way around this?
Thanks in advance.
Johnny
Check out this listing of Twitter resources for retrieving historical data. It looks like Tweetbird is the top with Searchastic getting good reviews, but it's shutdown now.
http://blog.tweetsmarter.com/twitter-search/10-ways-and-20-features-for-searching-old-tweets/
There is also a site called Snapbird that queries old tweets. They also have an API on Github that circumvents the 10 day search limit. You can of course use any API method to get user tweets.
https://github.com/remy/snapbird
You can also use Twitter's own since and until operator for timeframes but the capacity of historical data is limited, so it is recommended to use the resources listed instead.
example:
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name={screen_name}&since:2011-11-01&until:2011-11-06
Hi all
I am new to twitter API.. So my question may be a trivial one..
I am developing a new twitter widget, in which I want to get the first tweet for a given hashtag on a particular date.
say first tweet for #xyz hashtag tweeted on 12-08-10.
so far through googling and api doc I found rpp * page max = 1500.. if totaltweet for a given day is 2000 how can I retrieve last 500 tweets..
I have a few questions?
1. Is this for any hashtag that a user might request on the fly, or a set of hashtags that generally remain the same?
If it is a set of tags that stays the same for a while, roughly how many tags are there?
When you say a particular date, how far back in time are you going?
There are two standard ways to get tweets for a hashtag. You can use search, which goes back around 7 days or 1,500 tweets. For an active tag, that may only be a day or two. You can use the streaming API, but that doesn't go back, it just starts tracking from the moment you start making the request. The streaming API can track up to 400 hashtags without getting approval for a higher rate. The search API is limited to 10 to 20 hashtags per query.
If you answer questions 1-3, I can suggest a path to getting what you want.