小赖子的英国生活和资讯

SteemIt 获取微信群成员关注和粉丝的API

阅读 桌面完整版

昨天在弄 RSS 2.0版本的时候顺便把这两个API放出来. 一个是获取粉丝列表, 一个是获取关注列表, 两个都是返回JSON格式的数据, 数据每小时更新缓存. 目前暂时只能获取微信群里的成员, 但不排除之后扩展到全网. 需要入群者可以联系 @justyy

steemit-bot SteemIt 获取微信群成员关注和粉丝的API I.T. PHP是最好的语言 SteemIt

steemit-bot

举例说明 – 我的关注列表:

https://uploadbeta.com/api/steemit/account/following/?cached&id=justyy

举例说明 – 我的粉丝列表:

https://uploadbeta.com/api/steemit/account/followed/?cached&id=justyy

然后在PHP里可以简单封装一下:

1
2
3
4
5
6
7
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);
}
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);
}

据说, 关注大神所关注的是成功的第一步:

1
print_r(array_diff(getFollowing('tumutanzi'), getFollowing('justyy')));
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

强烈推荐

微信公众号: 小赖子的英国生活和资讯 JustYYUK

阅读 桌面完整版
Exit mobile version