Calling the Twitter API with YQL returns all individual items encoded into a single result

Issue: Results from calling the Twitter API using YQL are coming back as a single JSON-encoded string instead of multiple JSON items as expected. This makes calling the YQL from pipes unusable as far as I can tell.

Question: Is there anyway to specify that the results should be broken out as actual JSON elements and not encoded into a single string?

Background: The existing Twitter tables all seem to reference the fully deprecated v1 Twitter API, so I customized an existing one, http://www.datatables.org/twitter/twitter.status.timeline.user.xml so that it uses the 1.1 version API, HTTPS as is now required, and the correct parameters. [1. See table below]

The YQL works when providing the required auth keys, however the results come back as a single, JSON-encoded string instead of broken out by individual items [2. See results below]

[1. Table]

Zach Graves ( ) Twitter OAuth API select * from {table} where {format}

[2. Results]

{ "query": { "count": 1, "created": "2013-06-23T14:45:06Z", "lang": "en-US", "results": { "result": "[{\"created_at\":\"Sat Jun 22 15:28:42 +0000 2013\",\"id\":348462556484083712,\"id_str\":\"348462556484083712\",\"text\":\"\u201cWhere Orwell got it wrong\u201d by @johnofa https:\/\/t.co\/oBz84WFcPf\",\"source\":\"\u003ca href=\\"http:\/\/twitter.com\/tweetbutton\\" rel=\\"nofollow

...redacted ...

]] "yobetts\",\"name\":\"Richard Betts\",\"id\":14771728,\"id_str\":\"14771728\",\"indices\":[3,11]}]},\"favorited\":false,\"retweeted\":false,\"lang\":\"en\"}]\n" } } }

0 Replies

Recent Posts

in YQL