/[drupal]/contributions/modules/fb/fb_feed.js
ViewVC logotype

Contents of /contributions/modules/fb/fb_feed.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Oct 22 14:13:30 2009 UTC (5 weeks, 2 days ago) by yogadex
Branch: MAIN
File MIME type: text/javascript
Helper function for feed dialogs via ajax.
1 /**
2 * Javascript helpers for Facebook Feeds. Loaded by fb_feed.module.
3 */
4 FB_Feed = function(){};
5
6 /**
7 * Display a feed dialog on Facebook Connect pages, via http://wiki.developers.facebook.com/index.php/JS_API_M_FB.Connect.ShowFeedDialog.
8 *
9 * @param json is the json-encoded output of fb_feed_get_show_dialog_data().
10 */
11 FB_Feed.show_feed_dialog = function(json) {
12 var data_array = Drupal.parseJson(json);
13 var len = data_array.length;
14 for (var i=0; i < len; i++) {
15 var data = data_array[i];
16 if (data.bundle_id) {
17 // TODO: make use of the callback parameter.
18 FB.Connect.showFeedDialog(data.bundle_id, data.options.template_data, data.options.target_id, data.options.body_general, null, FB.RequireConnect.require, null, data.options.user_message_prompt, data.options.user_message);
19 }
20 }
21 };
22

  ViewVC Help
Powered by ViewVC 1.1.2