diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/default/assets/vendors/theme-widgets/vendor/mute/facebook/example/pricing-in-a-user-s-preferred-currency.php	Sat May 31 09:21:51 2025 +0800
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * Pricing in a User’s Preferred Currency
+ *
+ * @author Xavier Barbosa
+ * @since 13 February, 2013
+ * @link https://developers.facebook.com/blog/post/2012/06/28/pricing-in-a-user-s-preferred-currency/
+ **/
+
+use Mute\Facebook\App;
+
+/**
+ * Default params
+ **/
+
+$app_id = "YOUR_APP_ID";
+$app_secret = "YOUR_APP_SECRET";
+$access_token = 'USER_TOKEN';
+$user_id = 'USER_ID';
+
+/**
+ * The process
+ **/
+
+$app = new App($app_id, $app_secret);
+$result = $app->get($user_id, array(
+    'access_token' => $access_token,
+    'fields' => 'currency',
+));
+
+var_dump($result);