json Twitter搜索API获取用户的真实的姓名

4dbbbstv  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(55)

我试图开发一个twitter搜索引擎的参考https://dev.twitter.com/docs/api/1/get/search。我面临一个问题,我搜索了一下,我找不到任何东西。

$.ajax({
            type : "GET",
            dataType : "json",
            url : "http://search.twitter.com/search.json?q=" +search_value + "&rpp=5&callback=?",
            success: function(data){
                // Display the results

                $("#search_results").html(data);
            }
    });

字符串
如你所知,twitter API会根据你的搜索返回一个json,就像这个链接“https://dev.twitter.com/docs/api/1/get/search”(在示例请求部分)
我需要“用户名”和“用户的真实的名称”关于推文结果,在JSON格式我看不到,我也看了https://dev.twitter.com/docs/tweet-entities,但没有关于这一点的提示.只有“用户提到实体”,但这个用户在推文中提到的不是关于推文的共享者.你能帮助我这一点,请?

vulvrdjw

vulvrdjw1#

我建议您更新代码以使用最新版本的Twitter REST API -版本1.1,而不是使用Search API。
v1.1 API在search/tweets JSON响应中返回用户的真实的姓名-参见此处的示例响应:https://dev.twitter.com/docs/api/1.1/get/search/tweets

相关问题