Page 1 of 1

Problem using Twitter Json API in LiveCode

Posted: Sat Sep 10, 2011 4:56 pm
by IsDark
I'm strugling with a little problem fetching data from Twitter API.

When I called from firefox browser the below url it works (returning a JSON file):

Code: Select all

http://search.twitter.com/search.json?rpp=100&result_type=recent&page=1&q=love
When I try to fetch the data using LiveCode,

Code: Select all

      put ("http://search.twitter.com/search.json?rpp=100&result_type=recent&page=1&q=" & URLEncode("love")) into TwitterSearch
      put URL TwitterSearch into Logs
it returns
The request url was not found in the server
RAD Delphi XE can get the data, but LiveCode not.

Re: Problem using Twitter Json API in LiveCode

Posted: Sat Sep 10, 2011 5:48 pm
by sturgis
Hmm. It works for me as written.. well except I just dump the contents to a field.

This works as expected.

Code: Select all

on mouseUp
   put ("http://search.twitter.com/search.json?rpp=100&result_type=recent&page=1&q=" & URLEncode("love")) into TwitterSearch
   put TwitterSearch -- Maybe check to see if you have a typo, or problem with the url?
   put URL TwitterSearch into field "outField"
end mouseUp