当前位置: 首页>>代码示例>>PHP>>正文


PHP Utilities::fql方法代码示例

本文整理汇总了PHP中Utilities::fql方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::fql方法的具体用法?PHP Utilities::fql怎么用?PHP Utilities::fql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utilities的用法示例。


在下文中一共展示了Utilities::fql方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?php

include_once '../common/utilities.php';
$error_messages = array();
$title = 'Facebook album downloader';
$user = $fb->getUser();
$utilities = new Utilities();
if ($user) {
    $me = $fb->api('/me');
    $title = $me['name'] . ' : ' . $title;
    $userlist = $utilities->fql("SELECT uid, name, pic_square FROM user WHERE uid = me() OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me())");
} else {
    $title = 'Login : ' . $title . '';
    $messages['info'][] = 'Please ' . $utilities->url($fb->getLoginUrl(), 'login') . ' to use this app';
}
include "../views/userlist.php";
开发者ID:nkanand4,项目名称:facebook-album-downloader,代码行数:16,代码来源:index.php

示例2: Utilities

<?php

include_once '../common/utilities.php';
$uid = $_SESSION['uid'] = $_GET['uid'];
$name = $_GET['name'];
$cols = 4;
$utilities = new Utilities();
$albums = $utilities->fql("SELECT aid, name, cover_pid FROM album WHERE owner = " . $uid);
$pids = array();
for ($i = 0; $i < count($albums); $i++) {
    $pids[] = '"' . $albums[$i]['cover_pid'] . '"';
}
$photos = $utilities->fql("SELECT pid, src FROM photo WHERE pid in (" . implode(',', $pids) . ")");
$coverImages = array();
for ($i = 0; $i < count($photos); $i++) {
    $coverImages[$photos[$i]['pid']] = $photos[$i]['src'];
}
$title = $name . "'s Albums";
include "../views/albumlist.php";
开发者ID:nkanand4,项目名称:facebook-album-downloader,代码行数:19,代码来源:list_albums.php

示例3: isset

<?php

$aid = isset($_GET['aid']) ? $_GET['aid'] : '';
$name = isset($_GET['name']) ? $_GET['name'] : '';
include_once '../common/utilities.php';
if ($aid) {
    // user is requesting photos from album
    $fql = "SELECT src_small, src_big FROM photo where aid = '" . $aid . "'";
    $title = "Album photos : " . $name;
}
$utilities = new Utilities();
$photos = $utilities->fql($fql);
include '../views/photolist.php';
开发者ID:nkanand4,项目名称:facebook-album-downloader,代码行数:13,代码来源:list_photos.php


注:本文中的Utilities::fql方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。