我想知道下面的概念是否可行。我正在创建一个使用PHP的网站,跟踪各种社交媒体上的多个用户的帖子(标签,评论,喜欢),如facebook,twitter和instagram。
用户需要在我的网站上注册,每当他在fb,tw或instagram上发布带有特定标签的帖子/评论时,我的网站都会跟踪它,并在我的网站上为该用户分配一些点数。
我甚至不知道这是否可能。如果有人能帮上忙就太好了。谢谢。
发布于 2017-03-27 14:27:47
这里有一个样本,我认为它可以帮助你满足你的需求
在twitter上共享
通过API从twitter使用此回调url
https://cdn.api.twitter.com/1/urls/count.json?url=http://www.yourdomain.com
输出结果将是这样的
{
"count": 22,
"url": "http://www.yourdomain.com/"
}脸书https://graph.facebook.com/?id=http://www.yourdomain.com
{
"id": "http://www.yourdomain.com",
"shares": 60
}评论、点赞和分享数量
http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.yourdomain.com&format=json
[{
"url": "http://www.yourdomain.com",
"normalized_url": "http://www.yourdomain.com/",
"share_count": 11,
"like_count": 23,
"comment_count": 26,
"total_count": 60,
"click_count": 0,
"comments_fbid": 10150451628634400,
"commentsbox_count": 0
}]有关更多信息,请查看此链接https://www.madebymagnitude.com/blog/getting-your-social-share-counts-with-php/
https://stackoverflow.com/questions/42132813
复制相似问题