开发者

Filter Friends that are Online FBML

开发者 https://www.devze.com 2023-01-07 09:32 出处:网络
Ok, I have this array of a users friends, and I\'m just wondering how I can filter out the ones that are offline so that I only have the onli开发者_Go百科ne ones in the array :D

Ok, I have this array of a users friends, and I'm just wondering how I can filter out the ones that are offline so that I only have the onli开发者_Go百科ne ones in the array :D

Thanks


You don't need to do that, you just have to account for current logged in user whether it is you or anyone else and behind the scenes it will be however is logged in. You should simply make a check if a user is logged in (any user including friend):

if ($facebook->user > 0 && isset($facebook->user))
{
  // your code here....
}

The code in the condition will run only if a user is logged in.

0

精彩评论

暂无评论...
验证码 换一张
取 消