I have searched everywhere on the web, I have twitter implementation with monkeh coldfusion. The thing is callback returns id_str as number instead of string and I can't use it to reply/retweet/follow.
Any idea why comes like that and what I have to change ?
Thank you
There may not be anything wrong with your code, [id_str] is a number. If you are looking for the text in the tweet, it can be found at [text]. I hope this helps!
The issue was the we're using previous version of monkeh, once upgraded the id_str came as string.
Related
Hopefully this isn't a repetitive question, but I haven't been able to find the solution anywhere. I'm sorting keys in a NSDictionary using
sortedArrayUsingSelector:#selector(localizedCaseInsensitiveCompare:)
Everything is working great, except this returns my "#" key first. I'd prefer to return it after the "A-Z" keys. It's the only non-alphabet key.
Any help is greatly appreciated. Thanks!
So use sortedArrayUsingComparator instead, and use a custom comparator block that first checks for your "#" key, and specifies it should be after other strings, and returns the result of localizedCaseInsensitiveCompare for everything else. See if you can work that out, and if not post back with the code you tried and I'll help you debug it. (Are you using Objective-C or Swift?)
I am using the following URL to get all tweets that mention the farsi/arabic word "سلام" though the Topsy API:
http://otter.topsy.com/search.json?q=سلام&page=1&perpage=100&mintime=1244160000&maxtime=1244163600&apikey=FAF7F2D0D8A143978CB7762CE35FCF99
However, The results I get are as follows:
{"request":{"parameters":{"page":"1","q":"سلام","maxtime":"1244163600","perpage":"100","mintime":"1244160000"},"response_type":"json","resource":"search","url":"http://otter.topsy.com/search.json?maxtime=1244163600&mintime=1244160000&page=1&perpage=100&q=%D8%B3%D9%84%D8%A7%D9%85"},"response":{"window":"custom","page":1,"total":0,"perpage":100,"last_offset":0,"hidden":0,"list":[],"offset":0}}
The foreign word: "سلام" is read by the API as: %D8%B3%D9%84%D8%A7%D9%85 and thus no results are yielded. Any suggestions on what to do would be much appreciated!
Thanks :)
Both of them are equivalent. %D8%B3%D9%84%D8%A7%D9%85 is the HTML encoded version.
I have problem getting statistics information from youtube data api. I make a request to http://gdata.youtube.com/feeds/api/videos?q=video_id&alt=json, it works for some, but for some video id, the response does not contain 'entry', 'yt$statistics', 'gd$rating' for example:
zLcbznigfs missing 'entry', aVfN6XjACDY missing 'yt$statistics', fjhQ9Kf4iHk missing 'gd$rating'
After moving around, i found out the solution for this: use &alt=atom instead of using &alt=json, which means that we better read from Atom feed than JSON (and feedparser is an excellent module for doing this). I have checked this with several video id, it works fine.
Hope that help. Thanks.
I may be completely overlooking something but I can't seem to filter the user_timeline results by keyword in the REST api.
example:
http://twitter.com/status/user_timeline/starbucks.json?q=pumpkin
returns all the results, not the ones filtered by the word 'pumpkin'.
I finally figured out the method to do this if anybody else needs it,
http://search.twitter.com/search.json?q=+pumpkin+from:starbucks
remember to URL encode special chars after (?) , the top string didn't need it.
i have written some code in php there i have use mhash(MHASH_SHA256, $key) and its giving result as expected.i wanna know how we can achieve same thing in erlang.i can see in crypto their is one inbuild sha function is their but i dont think so its mean for sha256.
any suggestion what i have to do ?
thank you in advance.
Have you seen this page, which links to an SHA-256 module for Erlang?
EDIT: Apparently that code is obsolete, replaced by this module. If that still doesn't do what you want (in terms of hex/binary) I suggest you email its author, preferably with a patch.
It seems to me that the return value of the mentioned sha2 module depends on your input. If you call it with a binary, the result is binary; if you call it with a string, the result is a string:
sha2:hexdigest256("Zed").
"a90e4dc685583c72296ca49b5d0bb148f2e1197a805b2a1d2ff6d17b4398b2be"
sha2:hexdigest256(<<"Zed">>).
<<169,14,77,198,133,88,60,114,41,108,164,155,93,11,177,72,
242,225,25,122,128,91,42,29,47,246,209,123,67,...>>