Last change
on this file since 20276 was
8486,
checked in by rub, 14 years ago
|
Save todo list &co
|
-
Property svn:eol-style set to
LF
|
File size:
862 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | try |
---|
4 | { |
---|
5 | $fbme = null; |
---|
6 | $uid = $facebook->getUser(); |
---|
7 | $fbme = $facebook->api('/me'); |
---|
8 | |
---|
9 | $param = array( |
---|
10 | 'method' => 'users.getinfo', |
---|
11 | //~ //'uids' => $fbme['id'], |
---|
12 | 'uids' => $uid, |
---|
13 | 'fields' => 'name,current_location,profile_url', |
---|
14 | 'callback' => '' |
---|
15 | ); |
---|
16 | $userInfo = $facebook->api($param); |
---|
17 | d($userInfo); |
---|
18 | } |
---|
19 | catch (FacebookApiException $e) |
---|
20 | { |
---|
21 | d($e); |
---|
22 | } |
---|
23 | |
---|
24 | |
---|
25 | try { |
---|
26 | $statusUpdate = $facebook->api('/me/feed', 'post', array('message'=> $fbme['name'].' a mis à jour son status par Piwigo en test sur FB', 'cb' => '')); |
---|
27 | echo "Status mis à jour"; |
---|
28 | } catch (FacebookApiException $e) { |
---|
29 | d($e); |
---|
30 | } |
---|
31 | |
---|
32 | try { |
---|
33 | $result = $facebook->api('/me/albums', 'post', array('name' => 'Piwigo', 'message'=> 'Test')); |
---|
34 | d($result); |
---|
35 | echo "Album créé"; |
---|
36 | } catch (FacebookApiException $e) { |
---|
37 | d($e); |
---|
38 | } |
---|
39 | |
---|
40 | |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.