This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'lib/Braintree.php'; | |
Braintree_Configuration::environment('sandbox'); | |
Braintree_Configuration::merchantId('pgd5mp9hwy86jk52'); | |
Braintree_Configuration::publicKey('r2g6qwtr7n9q8fnm'); | |
Braintree_Configuration::privateKey('7ed14b6e3e256baa9b468eee6eb86146'); | |
$validParams = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function output() | |
{ | |
// Check authorization | |
if(is_authorized()) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return array( | |
'app_id' => '<my app id>', | |
'app_secret' => '<secret key>', | |
'access_token' => '149LIvZChokbuhabGRrKGlcJromc1QptEjrMch3wGuE8ae4RiuzMj9Mp8aZBWn09HelyVZB5ItsQZCiOwvoXJIivUWjhgn5uZA9Ld7WadAhEahoXK1MVosbDuS1iSG4uLE215jynfs7iMGnTV2USEhx8OWSc4ZD', | |
// i got this key from graph api explorer | |
'act_id' => '524189191044409', //got act id also from graph api explorer | |
'act_timezone' => '', | |
'page_id' => '', | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@Devel-56:/var/www/facebook-php-ads-sdk# ./vendor/bin/phpunit -c test/ | |
PHPUnit 4.3.1 by Sebastian Bergmann. | |
Configuration read from /var/www/facebook-php-ads-sdk/test/phpunit.xml | |
...E....EEEEEEEEEEEE.EEE | |
Time: 45.59 seconds, Memory: 7.50Mb | |
There were 16 errors: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$k = array(121,124,126,128);//my product ids.. I need to pass this type of ids | |
foreach($k as $productid) | |
{ | |
$client->execute($client->getCommand('record_action_on_item', array('pio_action' => 'view', 'pio_iid' => $productid))); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php session_start(); | |
error_reporting(1) ; | |
// use composer's autoloader to load PredictionIO PHP SDK | |
require_once("vendor/autoload.php"); | |
use PredictionIO\PredictionIOClient; | |
$client = PredictionIOClient::factory(array("appkey" => "mJmKNgP7xnzq7xGBkSRdwk1aqfVL96Q3z3g0GVWIKaxfgafCrmWWunP7iVESCDKy")); | |
//$client = Flight::prediction_client(); | |
for($i=1;$i<10;$i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php session_start(); | |
require_once("vendor/autoload.php"); | |
use PredictionIO\PredictionIOClient; | |
$client = PredictionIOClient::factory(array("appkey" => "6DzhlG31iEHRo1ThUeIswYoXBHYq825Xg8d8ZooUymdXVLBOvbWRBCyCIhfLEAhs")); | |
try{ | |
$user_id = 6; | |
$client->identify($user_id); |