Hi Jason, Well as I can see either its a bug in makeRequest or I am trying to do something which is not allowed:
I tried changing my output from the requested URL: Initially it was this: (the makeRequest failed) --------------------------------------------------------------------------- "sm":["batch videos <img\n src='\/library\/images\/smileys\/ i_funny.gif'\/> [eagerly awaiting! shady's secrets <img\n src='\/ library\/images\/smileys\/i_smile.gif'\/>]","If we cant live our dreams, whats the point of life? Simply to survive?","Happy Diwali yaar.....","cum to kapili <img\n src='\/library\/images\/smileys\/ i_funny.gif'\/> we will celebrate diwali!","Diwali ki ram ram sab bhai logon ko","<a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/ gtalkbots.com\/refer.php?url=http:\/\/in.youtube.com\/watch? v=k6s88AIl_5I\">http:\/\/in.youtube.com\/watch?v=k6s88AIl_5I<\/a><div style=\"margin-top:5px;\"><object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/ k6s88AIl_5I&hl=en&fs=1\"><\/param><param name=\"allowFullScreen\" value=\"true\"><\/param><embed src=\"http:\/\/www.youtube.com\/v\/ k6s88AIl_5I&hl=en&fs=1\" type=\"application\/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"344\"><\/embed><\/ object><\/div>","Ferrari out for 2010 season?? <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/gtalkbots.com\/refer.php?url=http:\/ \/networkz18.blogspot.com\">http:\/\/networkz18.blogspot.com<\/a>"," How to fix the problem of \u201csound is out of sync with the video \u201d - <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/ gtalkbots.com\/refer.php?url=http:\/\/www.dvd-ripper-copy.com\/articles \/fix-sound-out-of-sync-with-video.html\">http:\/\/www.dvd-ripper- copy.com\/articles\/fix-sound-out-of-sync-with-video.html<\/a>","Some breathtaking landscape photography <a rel=\"nofollow\" target=\"_blank \" href=\"http:\/\/gtalkbots.com\/refer.php?url=http:\/\/ www.guardian.co.uk\/travel\/gallery\/2008\/oct\/27\/uk-photography-landscape-photographer?picture=339034138\">http:\/\/www.guardian.co.uk\/travel\/gallery\/2008\/oct\/27\/uk-photography-landscape-photographer?picture=339034138<\/a>","happy diwali <img\n src='\/library\/images\/smileys\/i_smile.gif'\/>"," Yahoo enables playing music from within search engines - Instant music gratification - <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/ gtalkbots.com\/refer.php?url=http:\/\/ycorpblog.com\/2008\/09\/18\/ instant-music-gratification\/\">http:\/\/ycorpblog.com\/2008\/09\/18\/ instant-music-gratification\/<\/a>","making people to fall in love with netbeans 6.1","a nite without food - 12 am :| ..... 1 am <img \n src='\/library\/images\/smileys\/i_smile.gif'\/> ..... 2 am <img \n src='\/library\/images\/smileys\/i_bigsmile.gif'\/> ..... 3 am <img\n src='\/library\/images\/smileys\/i_smile.gif'\/> ..... 4 am :| ..... 5 am <img\n src='\/library\/images\/smileys\/ i_sad.gif'\/> ..... 6 am :\"( ..... 7 am <img\n src='\/library\/ images\/smileys\/i_bigsmile.gif'\/> (mess opens) ..... 8 am ZZzzzZ ..."," Yahoo\u2019s New Application Platform Is Heavy On Social Features - <a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/ gtalkbots.com\/refer.php?url=http:\/\/www.webmonkey.com\/blog\/ Yahoo_s_New_Application_Platform_Is_Heavy_On_Social_Features\">http:\/ \/www.webmonkey.com\/blog\/ Yahoo_s_New_Application_Platform_Is_Heavy_On_Social_Features<\/ a>","Deepawali subhakankshalu!","fook bombs. i want them all! <img \n src='\/library\/images\/smileys\/i_funny.gif'\/>","Chuck Norris can kill two stones with one bird.","*Wish You a Happy and Prosperous Deepavali*"," \u0926\u0940\u092a\u093e\u0935\u0932\u0940\u091a\u094d \u092f\u093e \u0938\u0930\u094d\u0935\u093e\u0928\u093e \u0939\u093e \u0930\u094d\u0926\u093f\u0915 \u0936\u0941\u092d\u0947\u091a\u094d \u0939\u093e !"," Gates no longer world's richest man - <a rel= \"nofollow\" target=\"_blank\" href=\"http:\/\/gtalkbots.com\/ refer.php?url=http:\/\/www.forbes.com\/2008\/03\/05\/buffett-worlds- richest-cx_mm_0229buffetrichest.html?feed=rss_popstories\">http:\/\/ www.forbes.com\/2008\/03\/05\/buffett-worlds-richest-cx_mm_0229buffetrichest.html?feed=rss_popstories<\/a>"] I changed that to this: (makeRequest working now) ---------------------------------------------------------------------------- videos :P [eagerly awaiting! shady's secrets :)]","If we cant live our dreams, whats the point of life? Simply to survive?","Happy Diwali yaar.....","cum to kapili :P we will celebrate diwali!","Diwali ki ram ram sab bhai logon ko","http:\/\/in.youtube.com\/watch? v=k6s88AIl_5I","Ferrari out for 2010 season?? http:\/\/ networkz18.blogspot.com"," How to fix the problem of \u201csound is out of sync with the video\u201d - http:\/\/www.dvd-ripper-copy.com\/ articles\/fix-sound-out-of-sync-with-video.html","Some breathtaking landscape photography http:\/\/www.guardian.co.uk\/travel\/gallery\/ 2008\/oct\/27\/uk-photography-landscape-photographer? picture=339034138","happy diwali :)"," Yahoo enables playing music from within search engines - Instant music gratification - http:\/\/ ycorpblog.com\/2008\/09\/18\/instant-music-gratification\/","making people to fall in love with netbeans 6.1","a nite without food - 12 am :| ..... 1 am :) ..... 2 am :D ..... 3 am :) ..... 4 am :| ..... 5 am :( ..... 6 am :\"( ..... 7 am :D (mess opens) ..... 8 am ZZzzzZ ..."," Yahoo\u2019s New Application Platform Is Heavy On Social Features - http:\/\/www.webmonkey.com\/blog\/ Yahoo_s_New_Application_Platform_Is_Heavy_On_Social_Features","Deepawali subhakankshalu!","fook bombs. i want them all! :P","Chuck Norris can kill two stones with one bird.","*Wish You a Happy and Prosperous Deepavali*"," \u0926\u0940\u092a\u093e\u0935\u0932\u0940\u091a\u094d \u092f\u093e \u0938\u0930\u094d\u0935\u093e\u0928\u093e \u0939\u093e \u0930\u094d\u0926\u093f\u0915 \u0936\u0941\u092d\u0947\u091a\u094d \u0939\u093e !"," Gates no longer world's richest man - http:\/\/ www.forbes.com\/2008\/03\/05\/buffett-worlds-richest-cx_mm_0229buffetrichest.html?feed=rss_popstories"] The difference is nothing, just that initially I was hyper linking the returning json data, and later on I am not. I am not sure if this is not allowed and I suspect that this can be a possible bug. Regards, Imoracle On Oct 28, 11:24 pm, Jason <[EMAIL PROTECTED]> wrote: > I got your code to work by removing the keyword 'function' from within > the body of init: > > ... > var refreshInterval = 0; > makeCachedRequest(url, parseJSON, params, refreshInterval); > > The URL you are trying to fetch from doesn't exist so it returns a 404 > as expected. Try another URL (evenhttp://www.google.com) instead. > > - Jason > > P.S. Since you're new to orkut development, you should check out the > OpenSocial Dev App > athttp://sandbox.orkut.com/Main#AppInfo.aspx?appId=291092957065, > which makes it easy to test and save sample OpenSocial code. Just add > output(jsonString) to your parseJSON function to see the response that > makeRequest returns directly within the app. > > On Oct 28, 10:20 am, imoracle <[EMAIL PROTECTED]> wrote: > > > I am doing it like this: > > > function makeCachedRequest(url, callback, params, refreshInterval) { > > var ts = new Date().getTime(); > > var sep = "?"; > > if (refreshInterval && refreshInterval > 0) { > > ts = Math.floor(ts / (refreshInterval * 1000)); > > } > > if (url.indexOf("?") > -1) { > > sep = "&"; > > } > > url = [ url, sep, "nocache=", ts ].join(""); > > gadgets.io.makeRequest(url, callback, params); > > > } > > > function parseJSON(obj) { > > var jsonString = obj.text; > > > } > > > function init() { > > var url = "http://mysite.com/returnJSON.php"; > > var params = ""; > > var refreshInterval = 0; > > function makeCachedRequest(url, parseJSON, params, refreshInterval); > > > } > > > Can someone help me here? I am new to orkut apps :( --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---