comparison default/assets/vendors/theme-widgets/vendor/mute/facebook/example/pricing-in-a-user-s-preferred-currency.php @ 0:1d038bc9b3d2 default tip

Up:default
author Liny <dev@neowd.com>
date Sat, 31 May 2025 09:21:51 +0800
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1d038bc9b3d2
1 <?php
2
3 /**
4 * Pricing in a User’s Preferred Currency
5 *
6 * @author Xavier Barbosa
7 * @since 13 February, 2013
8 * @link https://developers.facebook.com/blog/post/2012/06/28/pricing-in-a-user-s-preferred-currency/
9 **/
10
11 use Mute\Facebook\App;
12
13 /**
14 * Default params
15 **/
16
17 $app_id = "YOUR_APP_ID";
18 $app_secret = "YOUR_APP_SECRET";
19 $access_token = 'USER_TOKEN';
20 $user_id = 'USER_ID';
21
22 /**
23 * The process
24 **/
25
26 $app = new App($app_id, $app_secret);
27 $result = $app->get($user_id, array(
28 'access_token' => $access_token,
29 'fields' => 'currency',
30 ));
31
32 var_dump($result);