Sometimes am getting SAME return values from twitter search api based on geo location even though the request parameters are different. Can any one help me to understand why this is happening...is that because of any cache issue from twitter??
Regards,
Navin
Related
I am working on a web application which retrieves fitness data from the Google Fit REST API.
Everything worked fine until a few weeks ago. Now, Google Fit responds with a empty response body. So, the response contains absolute nothing. Google Fit returns a status code 200. I have changed nothing in my code which could have affected this.
I use this HTTP GET URL to request steps data:
https://www.googleapis.com/fitness/v1/users/me/dataSources/derived:com.google.step_count.delta:com.google.android.gms:merge_step_deltas/datasets/1443869895588000000-1446465495589000000
When I use this URL to request fitness data in the OAuth Playground everything works fine.
I would be very thankful if someone has an idea how to fix this! :)
I did not use Rest api But I Used History API and Session API. Google respond error most of the time when the time interval you gave is wrong, or the data-type you are requesting are mismatched. Try checking it one more time which are the parameters you are sending in post.
I found that we can use stream API to get the latest tweets based on hash tags or keywords.
It says you have to keep your http connection open. I am having a doubt regarding this.
Can anyone give me an example of stream API in php?
And other thing can I skip hashtag and keyword parameter is this API ? So I can all the statuses?
Can I pass a parameter like latitude and longitude to get tweets from the specific region?
You can request tweets by location, see their API documentation for specifying location boundaries:
https://dev.twitter.com/docs/streaming-apis/parameters#locations
Recently I implemented OAuth in our Ruby on Rails application with OAuth gem and started using it.
Technology :- Ruby On Rails
Before Implementing OAuth, I use to call the below URL it use to give the tweets properly,
http://search.twitter.com/search.json?q=moxie&count=100
But, After Implementing Oauth, I am calling the Below URL :-
https://api.twitter.com/1.1/search/tweets.json?q=moxie&count=100
Which is not giving the Tweets properly, i.e the result set is containing only Tweets of last couple of Days.
How to retrieve tweets from last two months or more than that?
Thanks in advance
check your api request limit, o try to split your request, by 50 tweats
I am trying to filter tweets from the Streaming API using a url in the track parameter. However I'm not getting the tweets I expect. My suspicion is that the filter doesn't apply to the expanded url and but to the automatically shortened url (t.co).
Can anyone confirm that this is the case? The Streaming Api docs don't even mention how the filtering is applied.
If this is the case does anyone have a workaround?
I'm using the extended URL with cURL. I get the live tweets on my terminal for a particular search parameter. You may like to look into this one.
curl https://stream.twitter.com/1/statuses/filter.json?track=SEARCH_PARAMETER -uUSERNAME:PASSWORD
I just want to check if a username exists in Twitter. I thought it would be part of the API, but cannot find it on the api wiki http://apiwiki.twitter.com/w/page/22554679/Twitter-API-Documentation.
Any ideas?
thanks
JP
It seems that I can pass screenname in the user search API. And I have to check for 404 not found status (if username does not exist). Seems a bit ugly, but might just work. Better suggestions welcome!
this gives 404:
http://api.twitter.com/1/users/show.xml?screen_name=thisdoesnotexist1234abxfd
this returns valid info:
http://api.twitter.com/1/users/show.xml?screen_name=billgates
thanks
JP
EDIT
The Twitter REST API v1 is no longer active. Please migrate to API
v1.1. https://dev.twitter.com/docs/api/1.1/overview.
#JP Even if the twitter api rate limit has been reached , 404 would be returned. SO this is as you said a dirty method. take into consideration the rate limit and add sufficient checks in your code so as not to reach them. the above method should work fine.
regards,