Example #1
0
function ShowAuth()
{
    global $fbcmdPrefs;
    $url = "http://www.facebook.com/code_gen.php?v=1.0&api_key={$fbcmdPrefs['appkey']}";
    if ($fbcmdPrefs['auth_auto_launch']) {
        LaunchBrowser($url);
    }
    print "\n";
    print "This application is not currently authorized.  To grant authorization,\n";
    print "Generate an access code at this website:\n\n";
    print "http://www.facebook.com/code_gen.php?v=1.0&api_key={$fbcmdPrefs['appkey']}\n";
    print "or execute: fbcmd go auth\n";
    print "obtain your authorization code (XXXXXX) and then execute: fbcmd AUTH XXXXXX\n\n";
}
Example #2
0
            if ($go == 'NOTICE' || $go == 'N') {
                $lastNoticeData = LoadDataFile('notices_save', 'noticefile');
                if (isset($lastNoticeData['href'][$fbcmdParams[2]])) {
                    LaunchBrowser($lastNoticeData['href'][$fbcmdParams[2]]);
                }
            }
            if ($go == 'MSG' || $go == 'M') {
                $curThreadId = GetThreadId($fbcmdParams[2]);
                if ($curThreadId) {
                    LaunchBrowser("http://www.facebook.com/inbox/?folder=[fb]messages&tid={$curThreadId}");
                }
            }
            if ($go == 'POST' || $go == 'P') {
                $lastPostData = LoadDataFile('stream_save', 'postfile');
                if (isset($lastPostData['url'][$fbcmdParams[2]])) {
                    LaunchBrowser($lastPostData['url'][$fbcmdParams[2]]);
                }
            }
        }
    }
    if (!$hasLaunched) {
        FbcmdWarning("Problem with your GO requeset");
    }
}
////////////////////////////////////////////////////////////////////////////////
if ($fbcmdCommand == 'INBOX') {
    ValidateParamCount(0, 1);
    SetDefaultParam(1, $fbcmdPrefs['default_inbox_count']);
    if (strtoupper($fbcmdParams[1]) == 'UNREAD') {
        $fqlThread = "SELECT thread_id,folder_id,subject,recipients,updated_time,parent_message_id,parent_thread_id,message_count,snippet,snippet_author,object_id,unread,viewer_id FROM thread WHERE folder_id = 0 AND unread > 0";
    } else {