我想为StumbleUpon开发一个应用程序,我需要检查是否有人在stumbleupon上关注另一个人。例如,用户X跟随用户Y,用户X需要按下一个按钮进行确认,我想与php确认,如果用户X跟随用户Y,则继续。有人知道我该怎么做吗?
发布于 2011-12-02 15:20:26
创建一个如下所示的函数:
function followed($follower,$followed){
$response = @file_get_contents('http://www.stumbleupon.com/stumbler/'.$follower.'/following/');
return (strpos($response,'/stumbler/'.$followed.'/') !== false);
}如果用户已经跟踪了你的目标stumbler,它将返回
希望这能有所帮助。
https://stackoverflow.com/questions/7732550
复制相似问题