V1接口与V2接口对应表

来源:互联网 发布:简单贪吃蛇c语言代码 编辑:程序博客网 时间:2024/05/29 04:47

本文下方的“新旧接口对应表”和官方提供的对应表相比缺少诸如“新”、“高”等标识信息,更详细信息请移步官方文档:http://open.weibo.com/wiki/V1_To_V2

V1接口切换到V2接口

  • 在实现OAuth2.0授权后,接下来需要将应用使用的V1版接口对应迁移到V2版接口。此时需要根据新接口的调用地址、调用方式、参数、返回值、错误信息处理来进行代码的改造。


  • 以下是V2版接口与V1版接口的对应列表,部分旧版接口由于用户投诉或性能等原因已不再提供,同时新版接口提供丰富的高级接口开放优质应用申请,您可以直接在应用控制台中提交高级接口申请。


  • 此外,SCOPE授权功能、好友分组接口、邀请接口、社交化等接口已经在平台开放计划中,我们将在保证功能、性能及稳定性后适时开放,详细的开放日期请您关注@微博API。
  • 如果现有接口未能满足您的需求,欢迎@微博API进行反馈,我们将根据开发者需求强度及微博用户利益权衡适度开放。


新旧接口对应表新版V2接口对应老版V1接口接口名称statuses/public_timelinestatuses/public_timeline获取最新的公共微博statuses/friends_timelinestatuses/friends_timeline获取当前登录用户及其所关注用户的最新微博statuses/home_timeline 获取当前登录用户及其所关注用户的最新微博statuses/friends_timeline/ids 获取当前登录用户及其所关注用户的最新微博的IDstatuses/user_timelinestatuses/user_timeline获取用户发布的微博statuses/user_timeline/ids 获取用户发布的微博的ID statuses/repost_timelinestatuses/repost_timeline返回一条原创微博的最新转发微博statuses/repost_timeline/ids 获取一条原创微博的最新转发微博的ID statuses/repost_by_mestatuses/repost_by_me返回用户转发的最新微博statuses/mentionsstatuses/mentions获取@当前用户的最新微博statuses/mentions/ids 获取@当前用户的最新微博的ID statuses/bilateral_timeline 获取双向关注用户的最新微博 statuses/showstatuses/show根据ID获取单条微博信息statuses/querymid 通过id获取midstatuses/queryid 通过mid获取idstatuses/hot/repost_daily 按天返回热门转发榜statuses/hot/repost_weekly 按周返回热门转发榜statuses/hot/comments_daily 按天返回当前用户关注人的热门微博评论榜statuses/hot/comments_weekly 按周返回热门评论榜statuses/countstatuses/counts 批量获取指定微博的转发数评论数statuses/repoststatuses/repost转发一条微博信息statuses/destroystatuses/destroy删除微博信息statuses/updatestatuses/update发布一条微博信息statuses/uploadstatuses/upload 上传图片并发布一条微博statuses/upload_url_text 发布一条微博同时指定上传的图片或图片url emotionsemotions获取官方表情comments/showstatuses/comments获取某条微博的评论列表comments/by_mestatuses/comments_by_me我发出的评论列表comments/to_mestatuses/comments_to_me我收到的评论列表comments/timelinestatuses/comments_timeline获取用户发送及收到的评论列表comments/mentions 获取@到我的评论comments/show_batch 批量获取评论内容comments/createstatuses/comment评论一条微博comments/destroystatuses/comment_destroy/:id删除一条评论comments/destroy_batchstatuses/comment/destroy_batch批量删除评论comments/replystatuses/reply回复一条评论users/showusers/show获取用户信息 users/domain_show 通过个性域名获取用户信息users/counts 批量获取用户的粉丝数、关注数、微博数friendships/friends 获取用户的关注列表friendships/friends/in_common 获取共同关注人列表friendships/friends/bilateral 获取双向关注列表friendships/friends/bilateral/ids 获取双向关注UID列表friendships/friends/idsfriends/ids获取用户关注对象UID列表friendships/followersfriendships/show、friendships/exists获取用户粉丝列表friendships/followers/idsfollowers/ids获取用户粉丝UID列表friendships/followers/active 获取用户优质粉丝列表friendships/friends_chain/followers 获取我的关注人中关注了指定用户的人friendships/showfriendships/exists获取两个用户关系的详细情况friendships/createfriendships/create关注某用户friendships/destroyfriendships/destroy取消关注某用户friendships/remark/updateuser/friends/update_remark更新关注人备注 account/get_privacyaccount/get_privacy获取隐私设置信息account/profile/school_list 获取所有学校列表account/rate_limit_statusaccount/rate_limit_status获取当前用户API访问频率限制account/get_uidaccount/verify_credentialsOAuth授权之后获取用户UID(作用相当于旧版接口的 account/verify_credentials)account/end_sessionaccount/end_session退出登录favoritesfavorites获取当前用户的收藏列表favorites/ids 获取当前用户的收藏列表的ID favorites/show 获取单条收藏信息favorites/by_tags 获取当前用户某个标签下的收藏列表favorites/tags 当前登录用户的收藏标签列表favorites/by_tags/ids 获取当前用户某个标签下的收藏列表的ID favorites/createfavorites/create添加收藏favorites/destroyfavorites/destroy删除收藏favorites/destroy_batchfavorites/destroy_batch批量删除收藏favorites/tags/update 更新收藏标签favorites/tags/update_batch 更新当前用户所有收藏下的指定标签favorites/tags/destroy_batch 删除当前用户所有收藏下的指定标签trendstrends获取某人话题trends/is_follow 是否关注某话题trends/hourlytrends/hourly返回最近一小时内的热门话题trends/dailytrends/daily返回最近一天内的热门话题trends/weeklytrends/weekly返回最近一周内的热门话题trends/followtrends/follow关注某话题trends/destroytrends/destroy取消关注的某一个话题tagstags返回指定用户的标签列表tags/tags_batch 批量获取用户标签tags/suggestionstags/suggestions返回系统推荐的标签列表tags/createtags/create添加用户标签tags/destroytags/destroy删除用户标签tags/destroy_batchtags/destroy_batch批量删除用户标签register/verify_nicknameaccount/verify_credentials验证昵称是否可用search/suggestions/users 搜用户搜索建议search/suggestions/statuses 搜微博搜索建议search/suggestions/schools 搜学校搜索建议search/suggestions/companies 搜公司搜索建议search/suggestions/apps 搜应用搜索建议search/suggestions/at_users @联想搜索search/topicstrends/statuses搜索某一话题下的微博 suggestions/users/hotusers/hot获取系统推荐用户suggestions/users/may_interestedusers/suggestions获取用户可能感兴趣的人suggestions/users/by_status 根据微博内容推荐用户suggestions/statuses/hot 获取微博精选推荐 suggestions/statuses/reorder 主Feed微博按兴趣推荐排序suggestions/statuses/reorder/ids 主Feed微博按兴趣推荐排序的微博IDsuggestions/favorites/hot 热门收藏suggestions/users/not_interested 不感兴趣的人remind/unread_countstatuses/unread获取某个用户的各种消息未读数 remind/set_countstatuses/reset_count对当前登录用户某一种消息未读数进行清零  short_url/shortenshort_url/shorten长链转短链 short_url/expandshort_url/expand短链转长链 short_url/clicks 获取短链接的总点击数 short_url/referers 获取一个短链接点击的referer来源和数量 short_url/locations 获取一个短链接点击的地区来源和数量 short_url/share/countsshort_url/share/counts获取短链接在微博上的微博分享数 short_url/share/statusesshort_url/share/statuses获取包含指定单个短链接的最新微博内容 short_url/comment/countsshort_url/comment/counts获取短链接在微博上的微博评论数 short_url/comment/commentsshort_url/comment/comments获取包含指定单个短链接的最新微博评论 short_url/info 批量获取短链接的富内容信息  notification/send 给一个或多个用户发送一条新的状态通知 common/code_to_location 通过地址编码获取地址名称 common/get_city 获取城市列表 common/get_province 获取省份列表 common/get_country 获取国家列表 common/get_timezone 获取时区配置表 place/public_timeline 获取公共的位置动态 place/friends_timeline 获取用户好友的位置动态place/user_timeline 获取某个用户的位置动态place/poi_timeline 获取某个位置地点的动态place/nearby_timeline 获取某个位置周边的动态place/statuses/show 获取动态的详情place/users/show 获取LBS位置服务内的用户信息place/users/checkins 获取用户签到过的地点列表place/users/photos 获取用户的照片列表place/users/tips 获取用户的点评列表place/users/todos 获取用户的todo列表 place/pois/show 获取地点详情place/pois/users 获取在某个地点签到的人的列表place/pois/tips 获取地点点评列表place/pois/photos 获取地点照片列表place/pois/search 按省市查询地点place/pois/category 获取地点分类place/nearby/pois 获取附近地点place/nearby/users 获取附近发位置微博的人place/nearby/photos 获取附近照片place/nearby_users/list 获取附近的人 place/pois/create 添加地点 place/pois/add_checkin 签到place/pois/add_photo 添加照片place/pois/add_tip 添加点评place/pois/add_todo 添加todo place/nearby_users/create 用户添加自己的位置 place/nearby_users/destroy 用户删除自己的位置 location/base/get_map_imagebase/get_map_image生成一张静态的地图图片location/geo/ip_to_geogeocode/ip_to_geo根据IP地址返回地理信息坐标location/geo/address_to_geogeocode/address_to_geo根据实际地址返回地理信息坐标location/geo/geo_to_addressgeocode/geo_to_address根据地理信息坐标返回实际地址location/geo/gps_to_offset 根据GPS坐标获取偏移后的坐标location/geo/is_domestic 判断地理信息坐标是否是国内坐标location/pois/show_batch 批量获取POI点的信息location/pois/search/by_locationpois/round 根据关键词按地址位置获取POI点的信息location/pois/search/by_geopois/keyword根据关键词按坐标点范围获取POI点的信息location/pois/search/by_areapois/view根据关键词按矩形区域获取POI点的信息location/pois/addpois/add_poi、pois/get_poi提交一个新增的POI点信息location/mobile/get_locationloc/get_location根据移动基站WIFI等数据获取当前位置信息location/line/drive_routenavigation/route根据起点与终点数据查询自驾车路线信息location/line/bus_routebus/transfer根据起点与终点数据查询公交乘坐路线信息location/line/bus_linebus/line根据关键词查询公交线路信息location/line/bus_stationbus/station根据关键词查询公交站点信息location/citycode 城市代码对应表location/citycode_bus 公交城市代码表location/category 分类代码对应表location/error2 地理位置信息接口错误代码及解释


V2中已废弃或暂未支持的V1接口user/statuses/id根据微博ID和用户ID跳转到单条微博页面account/update_privacy设置隐私信息blocks/create将某用户加入黑名单account/update_privacy设置隐私信息blocks/exists检测某用户是否是黑名单用户blocks/blocking列出黑名单用户(输出用户详细信息)blocks/blocking/ids列出分页黑名单用户(只输出id)account/update_profile_image更改头像account/update_profile更改资料


OAuth2(开发指南)oauth2/authorize请求用户授权Tokenoauth2/access_token获取授权过的Access Tokenoauth2/get_oauth2_tokenOAuth1.0的Access Token更换至OAuth2.0的Access Token