示例#1
0
//$access_token = $session->getAccessToken();
$session = new FacebookSession($accessToken);
*/
$catID = $_pgR["cid"];
$adTypeID = $_pgR["tid"];
$deleted = $_pgR["deleted"];
$condition = '';
if ($catID) {
    $condition .= global_mapping::ArticleTypeID . '=' . $catID . '';
}
if ($deleted) {
    $condition .= ' And ' . global_mapping::IsDeleted . '=1';
} else {
    $condition .= ' And (' . global_mapping::IsDeleted . '=0 or ' . global_mapping::IsDeleted . ' is null)';
}
$allStores = $objStore->getStoresByCatID($catID, '`Name`,FacebookID');
//print_r($allStores);
//return;
//$allAds = $objAdvertising->getAllAdvertising(0,null,$condition,null);
$allAdType = $objAdType->getAllAdType(0, null, null, null);
$allCats = $objArticleType->getAllArticleType(0, null, 'ParentID=0', null);
if ($_pgR['act'] == 9999) {
    //echo 'act 9999';
    $accessToken = $_facebookToken;
    $fb = new Facebook\Facebook(['app_id' => $_facebookAppID, 'app_secret' => $_facebookSecrect, 'default_graph_version' => $_facebookVersion, 'default_access_token' => $accessToken]);
    $posts = array();
    //print_r($allStores);
    //echo 'count($allStores) <br>';
    //echo count($allStores);
    //echo '<br>';
    $gotPosts = array();