Mercurial > nebulaweb3
comparison default/assets/vendors/theme-widgets/vendor/mute/facebook/example/fql-photo.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 * Requesting photo in fql | |
5 * | |
6 * @author Xavier Barbosa | |
7 * @since 13 February, 2013 | |
8 * @link https://developers.facebook.com/blog/post/2012/04/11/platform-updates--operation-developer-love/ | |
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 | |
21 /** | |
22 * Get the place | |
23 **/ | |
24 | |
25 $app = new App($app_id, $app_secret); | |
26 $result = $app->fql('SELECT place_id FROM photo WHERE object_id = 10150769146166495', array( | |
27 'access_token' => $access_token, | |
28 )); | |
29 | |
30 var_dump($result); | |
31 | |
32 /** | |
33 * Get the sources | |
34 **/ | |
35 | |
36 $app = new App($app_id, $app_secret); | |
37 $result = $app->fql('SELECT src, width, height FROM photo_src WHERE photo_id = 10150769146166495 AND width > 480', array( | |
38 'access_token' => $access_token, | |
39 )); | |
40 | |
41 var_dump($result); |