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


PHP Facebook::getUnique方法代码示例

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


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

示例1: die

 if ($_GET['optin'] != "true") {
     die("</br>Do not fool around with the parameters.");
 }
 if (isset($_GET['optout'])) {
     if ($_GET['optout'] != "sec1") {
         die("</br>Do not fool around with the parameters.");
     }
 }
 echo "<h3>Dearest " . $me['name'] . "!</br>Thank you for participating in our survey.</h3>";
 echo "<h3>You should soon receive an email to " . $me['email'] . " with a download link.</h3>";
 echo "<h4>In case you have further questions, contact the survey author: Markus Huber mhuber@sba-research.org</h4>";
 echo "<h4>Spread the surveylink: http://is.gd/snapshotsurvey</h4>";
 $sendid = "";
 // It's probably a safe assumption to use the & here (instead of checking if we need ?), the Graph API needs the access token in the URL anyway, so there are parameters.
 if (!isset($_GET['sendid'])) {
     $sendid = "snapshot" . $facebook->getUnique();
 } else {
     $sendid = $_GET['sendid'];
 }
 /*
 echo "<h4>Facebook account: " . $me['email'] . "</h4>";
 echo "</br>" . $sendid;
 echo "</br>" . $_GET['optin'];
 echo "</br>" . $_GET['optout'];
 echo "</br>" . $facebook->getUser() . "</br>";*/
 //echo $entry;
 $entry = $facebook->getUser() . ";" . $_GET['optin'] . ";" . $_GET['optout'] . ";" . $sendid . "\n";
 //Cookie for only one snapshot a week
 if ($_COOKIE["uid"] != $facebook->getUser()) {
     $surveylogfile = "/var/www/SocialSnapshot/survey.log";
     $fh = fopen($surveylogfile, 'a') or die("can't open surveyfile: contact mhuber@sba-research.org");
开发者ID:257naba,项目名称:social-snapshot-tool,代码行数:31,代码来源:survey.php

示例2: foreach

} else {
    ?>
<a href="<?php 
    echo $loginUrl;
    ?>
" id='connectlink'>
<img src="http://static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif">
</a>
<?php 
}
if ($me) {
    echo "<h3>Fetching your Facebook account data...</h3>";
    $sendid = "";
    // It's probably a safe assumption to use the & here (instead of checking if we need ?), the Graph API needs the access token in the URL anyway, so there are parameters.
    if (!isset($_GET['sendid'])) {
        $sendid = "snapshot" . $facebook->getUnique();
    } else {
        $sendid = $_GET['sendid'];
    }
    echo "<h3>Once finished, an email will be send to: " . $me['email'] . "</h3>";
    echo "Profiles of friends included in social snapshot:<br/>";
    $friends = $facebook->api('/me/friends');
    foreach ($friends['data'] as $friend) {
        echo "<a class='friend' href='http://www.facebook.com/profile.php?id=" . $friend['id'] . "'>" . $friend['name'] . "</a>&nbsp;";
    }
    flushOutput();
    if (!isset($_GET['continue'])) {
        if (!isset($_GET['sendid'])) {
            echo "<p><a class='continue' href='" . $_SERVER['REQUEST_URI'] . "&continue=y&sendid=snapshot" . $facebook->getUnique() . "'>Continue</a></p>";
        } else {
            echo "<p><h2><a class='continue' href='" . $_SERVER['REQUEST_URI'] . "&continue=y'>Start Social Snapshot (Continue)</a></h2></p>";
开发者ID:257naba,项目名称:social-snapshot-tool,代码行数:31,代码来源:index.php


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