Reading JSON twitter feeds not possible with some tiwtter accounts...(?)
I'm running into this problem where I can not read the JSON tweet results from one certain account.. :S . The account works like every other account and tweets are posted as usual, however the returned JSON result seems to be empty... When I switch the account from public to private then their's no result at all (so this is not the problem), but when the account is public like most others, the JSON url simply returns a blank value ([()]
)...
These work:
twitter.com/status/user_timeline/roelkrottje.json?count=1&callback=?
twitter.com/status/user_timeline/inconelnl.json?count=1&callback=?
twitter.com/status/user_ti开发者_如何学JAVAmeline/telegraaf.json?count=1&callback=?
twitter.com/status/user_timeline/volkskrant.json?count=1&callback=?
This one doesn't work:
http://twitter.com/status/user_timeline/hotelvroenhof.json?count=1&callback=?
You can check this in any browser....Does anybody have got any idea what's up with this account???? There have been messages posted very recently so it's not like there are no messages/tweets...
Thanks in advance! -Roel Krottje
First of all, use this format: http://api.twitter.com/1/statuses/user_timeline.json?screen_name=roelkrottje
your example does work this way;
http://api.twitter.com/1/statuses/user_timeline.json?screen_name=hotelvroenhof
from: https://dev.twitter.com/docs/api/1/get/statuses/user_timeline
Returns the 20 most recent statuses posted by the authenticating user. It is also possible to request another user's timeline by using the screen_name or user_id parameter. The other users timeline will only be visible if they are not protected, or if the authenticating user's follow request was accepted by the protected user
You should check if; - Is it your own account? Are you authenticated? - Is the timeline protected? If so, no luck for you... - Are you following the user?
1 and 3 should give you a yes, 2 a no, then it should work
Most important; follow the API guidelines!!
精彩评论