获取微信群成员关注和粉丝的API - Two APIs to get the followers and following list in the Wechat Group

in cn •  2 years ago  (edited)

Two APIs are made available exclusively for the members in the wechat group. Contact contact#tumutanzi.com or @rivalhw to join the steemit wechat group.

These APIs are used to get the list of followers and following. The API results are cached in the CloudFlare edge servers and updated every hour.

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

Get the list of my following :
举例说明 - 我的关注列表:

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

Get the list of my fans (followed)
举例说明 - 我的粉丝列表:

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

Wrapped in PHP, that becomes:
然后在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);
}

Check the steemians that a big whale follows but you haven't followed yet.
据说,关注大神所关注的是成功的第一步:

print_r(array_diff(getFollowing('tumutanzi'), getFollowing('justyy')));

这样就能知道 @tumutanzi 关注的 而我却还没有关注的人。

新技能,你 get 了么?
在使用过程中如有建议或者BUG反馈,请直接 @justyy (微信steemit 都可以)
Any suggestions/bugs, please report to @justyy

Originally published at https://steemit.com Thank you for reading my post, feel free to Follow, Upvote, Reply, ReSteem (repost) @justyy which motivates me to create more quality posts.

原文首发于 https://Steemit.com 首发。感谢阅读,如有可能,欢迎Follow, Upvote, Reply, ReSteem (repost) @justyy 激励我创作更多更好的内容。

// Later, it will be reposted to my blogs: justyy.com, helloacm.com and codingforspeed.com 稍后同步到我的中文博客和英文计算机博客

近期热贴

Recent Popular Posts


Tags: cn cn-programming steemdev steemit php

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

偶像最近做的这些都不难,但是都很实用,对于我们的需求很了解呀,果然是用心了的!

做出来的东西不实用再绚也没啥卵用。

我最近刚写了客户体验的论文,你这个发现需求,并设计和实现出来的,十分符合客户体验设计原则。

这种造福于民的好事,怎么能不鼓励下呢?

多谢多谢 好开森^^