te Name: Influencer fb analytics */ get_header('campaign'); $result = ""; if(!empty($_COOKIE["in_id"])){ $strUserId = base64_decode($_COOKIE["in_id"]); }else{ wp_redirect(site_url()."/signin/"); exit; } //printArray($_SESSION); if (!isset($_SESSION['access_token'])) { header('Location: '.site_url()."/fb-connection/"); exit(); } $strPageToken = ""; //printArray($_REQUEST); if(isset($_REQUEST["page-token"]) && !empty($_REQUEST["page-token"])){ $strPageToken = trim($_REQUEST["page-token"]); $_SESSION["fbpage_token"] = $strPageToken; } //echo ABSPATH."wp-content/themes/influencer/facebooklogin/"; //echo __FILE__."/facebooklogin/config.php"; if(!empty($strPageToken)){ if(isset($_REQUEST["frmFacebookPostId"]) && !empty($_REQUEST["frmFacebookPostId"])){ $postID = trim($_REQUEST["frmFacebookPostId"]); require_once ABSPATH."wp-content/themes/influencer/facebooklogin/config.php"; try { // Returns a `FacebookFacebookResponse` object //$response = $FB->get('/984554695042902/video_insights/total_video_views', $strPageToken ); $comment_response = $FB->get( '/'.$postID.'/comments?summary=1&filter=toplevel', $strPageToken ); } catch(Facebook\Exceptions\FacebookResponseException $e) { echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(Facebook\Exceptions\FacebookSDKException $e) { echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } $getCommentGraphEdge = $comment_response->getGraphEdge(); if(!empty($getCommentGraphEdge)){ $commentMetaData = $getCommentGraphEdge->getMetaData();//$getGraphEdge->getDecodedBody(); $comment_count = !empty($commentMetaData["summary"]["total_count"]) ? $commentMetaData["summary"]["total_count"] : 0; //echo "Total comment count : ".$comment_count."
"; } try { // Returns a `FacebookFacebookResponse` object //$response = $FB->get('/984554695042902/video_insights/total_video_views', $strPageToken ); $reactionsResponse = $FB->get( '/'.$postID.'/reactions?summary=1&filter=toplevel', $strPageToken ); } catch(FacebookExceptionsFacebookResponseException $e) { echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(FacebookExceptionsFacebookSDKException $e) { echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } $reactionGraphEdge = $reactionsResponse->getGraphEdge(); if(!empty($reactionGraphEdge)){ $reactionMetaData = $reactionGraphEdge->getMetaData();//$getGraphEdge->getDecodedBody(); //printArray($reactionMetaData); $reaction_count = !empty($reactionMetaData["summary"]["total_count"]) ? $reactionMetaData["summary"]["total_count"] : 0; //echo "Total reaction count : ".$reaction_count."
"; } try { // Returns a `FacebookFacebookResponse` object $shareResponse = $FB->get( '/'.$postID.'/shares?summary=1&filter=toplevel', $strPageToken ); } catch(FacebookExceptionsFacebookResponseException $e) { echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(FacebookExceptionsFacebookSDKException $e) { echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } $shareGraphEdge = $shareResponse->getGraphEdge(); if(!empty($shareGraphEdge)){ $shareMetaData = $shareGraphEdge->getMetaData();//$getGraphEdge->getDecodedBody(); $share_count = !empty($shareMetaData["summary"]["total_count"]) ? $shareMetaData["summary"]["total_count"] : 0; //echo "Total share count : ".$share_count."
"; } //$graphNode = $response->getGraphNode(); //$likesEdge = $response->getGraphEdge(); //$totalCount = $likesEdge->getTotalCount(); //echo "total_likes: ".$totalCount; //$url = 'https://graph.facebook.com/v3.0/'.$_REQUEST["frmFacebookPostId"].'?picture,shares,comments{comment_count.summary(true)},reactions.summary(true)&access_token='.$strPageToken; //$url = 'https://graph.facebook.com/v3.0/'.$_REQUEST["frmFacebookPostId"].'?fields=full_picture%2Cshares%2Ccomments%7Bcomment_count.summary(true)%7D%2Creactions.summary(true)&access_token='.$strPageToken; // Initiate curl /*$ch = curl_init(); // Disable SSL verification curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Will return the response, if false it print the response curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Set the url curl_setopt($ch, CURLOPT_URL,$url); // Execute $result=curl_exec($ch); // Closing curl_close($ch); */ // Will dump a beauty json :3 //var_dump(json_decode($result, true)); } } ?>

Analytics

Campaign Name  :
Sitaram Bhartia
Date  :
2018-02-26

Please share proof of campaign below

ID
First Name
Last Name
Email
Page manage Followers