昨天在弄 RSS 2.0版本的时候顺便把这两个API放出来. 一个是获取粉丝列表, 一个是获取关注列表, 两个都是返回JSON格式的数据, 数据每小时更新缓存. 目前暂时只能获取微信群里的成员, 但不排除之后扩展到全网. 需要入群者可以联系 @justyy
举例说明 – 我的关注列表:
https://uploadbeta.com/api/steemit/account/following/?cached&id=justyy
举例说明 – 我的粉丝列表:
https://uploadbeta.com/api/steemit/account/followed/?cached&id=justyy
然后在PHP里可以简单封装一下:
function getFollowing($id) {
return json_decode(file_get_contents("https://uploadbeta.com/api/steemit/account/following/?cached&id=$id"), true);
}
function getFollowed($id) {
return json_decode(file_get_contents("https://uploadbeta.com/api/steemit/account/followed/?cached&id=$id"), true);
}
据说, 关注大神所关注的是成功的第一步:
print_r(array_diff(getFollowing('tumutanzi'), getFollowing('justyy')));
这样就能知道 @tumutanzi 关注的 而我却还没有关注的人.
新技能, 你 get 了么? 在使用过程中如有建议或者BUG反馈, 请直接 @justyy (微信或 steemit 都可以)
英文: SteemIt API – Two APIs to get the followers and following list in the Wechat Group
本文一共 190 个汉字, 你数一下对不对.上一篇: SteemIt CN 区优质内容点赞机器人上线了!
下一篇: 今天用了机器人给经理请了假 The Zenefit Bot on Slack
扫描二维码,分享本文到微信朋友圈
