Back to PhocaGalleryFbSystem class

Method getCommentsParams

public static
getCommentsParams
(mixed $id)

Method getCommentsParams - Source code

public static function getCommentsParams($id)
{
    $o = array();
    $item = self::getFbUserInfo($id);
    if (isset($item->appid)) {
        $o['fb_comment_app_id'] = $item->appid;
    }
    if (isset($item->comments) && $item->comments != '') {
        $registry = new Registry();
        $registry->loadString($item->comments);
        $item->comments = $registry->toArray();
        foreach ($item->comments as $key => $value) {
            $o[$key] = $value;
        }
    }
    return $o;
}