Twitter: Hash tag json api [duplicate] - twitter

This question already has answers here:
Twitter API no longer returning results [closed]
(2 answers)
Closed 8 years ago.
In my app, I am just displaying tweets of a public profile page using twitter json api.
eg. "http://search.twitter.com/search.json?q=abc".
Earlier it was working properly but recently not getting any response from the server. I have seen couple of posts on stackoverflow itself stating that twitter json server keeps getting down in few days. so, is there any other way to get json reponse for a particular hashtag.
Thanks.

When performing that request, Twitter explains that
The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview
You need to use the new API (v1.1) which requires user authentication for every request, and, unfortunately, is more complicated in querying simple things like search results.

Related

Google Fit API - retrieving of fitness datasets

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.

How to get and display API like the facebook graph in rails

I've went through most of the beginner rails books and I want to try creating something on my own. For a start, I just want to create a few pages in rails that will get from Facebook's api and display something like username, likes, post. I've searched around and couldn't find an answer. My friend recommended that I use a gem called fb_graph, but reviewing the documentation, I have no clue how to use it.
Thanks stackoverflow!
You can query the Graph API directly. The responses will be in JSON which you can then parse into Ruby hash. See the Facebook Documentation for more details on to call specific and sample JSON responses. So here is general guide how to you can start playing around with this:-
Make a API Call to Facebook using Graph API
Explorer. Keep playing around with api until you get a response you want. Note the request params you passed to get that response & JSON you received from facebook.
Send a HTTP request containing those same params in rails using koala, 'fb_graph' or just plain NET:HTTP. It doesn't matter what client you use to sent the request, as long as you send same params as in step1, you will get that familar JSON as response.
Now, once you have the json, just have to parse it. Provided, if the client library is not already doing that as most fb gems will turn JSON into ruby objects/hashes. But if they don't, then you have to do it manually, its something like JSON.parse('JSON_RESPONSE_AS_STRING_GOES_HERE'). after this you will have a plain-old ruby hash which is you can save to db, display in view or whatever you want to do.
Hope it helps

How to get results with twitter search api?

I wish to get tweets with a keyword. But There is no result with any keyword.
http://search.twitter.com/search.json?q=summer
How to get results with Twitter Search API?
Version 1 of the twitter API has been deprecated and is being removed. Not sure how you can miss the giant warnings on the twitter dev site ;) This means simple code like the above will not work any more.
So, you now need to make authenticated requests (OAuth) using the 1.1 API, and it's nowhere near as simple as just doing a (in PHP) file_get_contents(http://search.twitter.com/ ...).
I couldn't see any server-side languages you use from your profile, but I wrote a lengthy post explaining the issue (with pictures) and how to use a php library to perform authenticated requests.

Twitter Api giving only tweets of Last Couple of days

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

What are the differences between versions 1 and 2 of STRAVA API and how to get "streams" objects with v2?

I am currently tinkering with STRAVA API (Strava is a site for logging, sharing and comparing GPS tracklogs taken during cycling and running activities).
In order to get the streams (sample logs) of an activity like this:
http://www.strava.com/rides/9999
one can use the Version 1 of the API like this:
http://www.strava.com/api/v1/streams/9999
which returns a json string with time-series of speed, position, heartrate, etc.
My problems are:
Is there a way to get streams using API v2?
Where is the documentation for API v1?
Docs for API v2 are here
I've read somewhere that there are differences between POST and GET methods of the API, and that some data require authentication, but I am still (yet more) confused...
Thanks for any help!
UPDATE:
For anyone arriving here, as for end of 2013 Strava has (not) released their rather closed V3 API, and shut down their V1 and V2 endpoints.
However, it's still possible to get the JSON streams of a given activity with URLs like these (using activity of Id 9999 as a working example):
http://app.strava.com/stream/9999
http://app.strava.com/activities/9999/streams
Be aware that these APIs are being deprecated. Here is link to both versions of the API documentation, and a place to sign up for notification about the new API coming in early 2013.
You will find that the REST style is only loosely followed for these versions of the API, thus your confusion is understandable. The new API follows the REST style much more rigorously. For V1 and V2 GET of a resource will usually return an the object representing that resource in json format. However there are cases where POST returns the object rather than creating one. Streams are not returned by the V2 API, only V1. IHTH

Resources