ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/facebook/trunk/facebookapi_php5_restlib.php
(Generate patch)

Comparing facebook/trunk/facebookapi_php5_restlib.php (file contents):
Revision 959 by douglas, 2007-11-13T15:22:57-08:00 vs.
Revision 981 by douglas, 2008-01-16T16:47:47-08:00

# Line 278 | Line 278 | function toggleDisplay(id, type) {
278    }
279  
280    /**
281 <   * Sends an email notification to the specified user.
282 <   * @return string url which you should send the logged in user to to finalize the message.
281 >   * Sends a notification to the specified users.
282 >   * @return (nothing)
283     */
284 <  public function notifications_send($to_ids, $notification, $email='') {
284 >  public function notifications_send($to_ids, $notification) {
285      return $this->call_method('facebook.notifications.send',
286 <                              array('to_ids' => $to_ids, 'notification' => $notification, 'email' => $email));
286 >                              array('to_ids' => $to_ids, 'notification' => $notification));
287 >  }
288 >
289 >  /**
290 >   * Sends an email to the specified user of the application.
291 >   * @param array $recipients : id of the recipients
292 >   * @param string $subject : subject of the email
293 >   * @param string $text : (plain text) body of the email
294 >   * @param string $fbml : fbml markup if you want an html version of the email
295 >   * @return comma separated list of successful recipients
296 >   */
297 >  public function notifications_sendEmail($recipients, $subject, $text, $fbml) {
298 >    return $this->call_method('facebook.notifications.sendEmail',
299 >                              array('recipients' => $recipients,
300 >                                    'subject' => $subject,
301 >                                    'text' => $text,
302 >                                    'fbml' => $fbml));
303    }
304  
305    /**
# Line 299 | Line 315 | function toggleDisplay(id, type) {
315    }
316  
317    /**
318 <   * Returns true if logged in user is an admin for the passed page
318 >   * Returns true if logged in user is an admin for the passed page
319     * @param int $page_id target page id
320     * @return boolean
321     */
# Line 319 | Line 335 | function toggleDisplay(id, type) {
335    }
336  
337    /**
338 <   * Returns true if logged in user is a fan for the passed page
338 >   * Returns true if logged in user is a fan for the passed page
339     * @param int $page_id target page id
340     * @param int $uid user to compare.  If empty, the logged in user.
341     * @return bool
# Line 1332 | Line 1348 | function toggleDisplay(id, type) {
1348               'no_data' => $no_data));
1349    }
1350  
1351 +  /**
1352 +   * Get the properties that you have set for an app.
1353 +   *
1354 +   * @param  properties  list of properties names to fetch
1355 +   * @return             a map from property name to value
1356 +   */
1357 +  public function admin_getAppProperties($properties) {
1358 +    return json_decode($this->call_method
1359 +                       ('facebook.admin.getAppProperties',
1360 +                        array('properties' => json_encode($properties))), true);
1361 +  }
1362 +
1363 +  /**
1364 +   * Set properties for an app.
1365 +   *
1366 +   * @param  properties  a map from property names to  values
1367 +   * @return             true on success
1368 +   */
1369 +  public function admin_setAppProperties($properties) {
1370 +    return $this->call_method
1371 +      ('facebook.admin.setAppProperties',
1372 +       array('properties' => json_encode($properties)));
1373 +  }
1374 +
1375 +
1376 +
1377    /* UTILITY FUNCTIONS */
1378  
1379    public function call_method($method, $params) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines