Implement a feed gathering messages re. to Labdoo

×

Статус

You are not a member of this team. If you want to be part of this team, click on 'Subscribe to this team'.
Type: 
Feature request
Status: 
Open
Priority: 
Normal
Description: 

This was work done a few months ago that was interrupted, putting here the patch in case we want/can to resume this work in the future.

diff --git a/modules/custom/labdoo_lib/labdoo_lib.module b/modules/custom/labdoo_lib/labdoo_lib.module
index 69ea8c3..9ef6377 100644
--- a/modules/custom/labdoo_lib/labdoo_lib.module
+++ b/modules/custom/labdoo_lib/labdoo_lib.module
@@ -4146,3 +4146,62 @@ function labdoo_block_filter_object_menu() {
return FALSE;
}

+
+function labdoo_lib_pull_global_feeds() {
+
+print('
+

+
+

+

+

+
+(text to appear over the image goes here)
+(text to appear over the image goes here)
+(text to appear over the image goes here)
+(text to appear over the image goes here)
+(text to appear over the image goes here)
+

+

+');
+
+return;
+
+ // Ensure the colorbox popup shows up as a photo (and not binary code)
+ // even if the picture query does not have an image extension
+ // (for instance, as is the case when querying Facebook graph to pull
+ // a picture)
+ drupal_add_js(array('colorbox' => array('photo' => TRUE)), 'setting');
+
+ // This is using an internal function from the FB pull module instead of the API
+ // as this function is what we need here.
+ $feedsParsed = _facebook_pull_feed_cached("labdoo", "feed", "101911789903273", "082b6322e08d371e907cd097b4ce0b9e", Array ( "limit" => 10, "locale" => "en" ));
+
+ for ($i = 0; $i < sizeof($feedsParsed); $i++) {
+
+ $message = $feedsParsed[$i]->message;
+ $pictureUrl = "https://graph.facebook.com/" . $feedsParsed[$i]->object_id . "/picture?width=600";
+ print($message);
+ print('');
+ }
+
+
+//$pictureUrl = "https://graph.facebook.com/" . $feedsParsed[0]->object_id . "/picture?width=600";
+//print('');
+
+//labdoo_lib_print_array($feedsParsed[0]->message);
+//labdoo_lib_print_array($feedsParsed[0]->link);
+//labdoo_lib_print_array($feedsParsed[0]->picture);
+//labdoo_lib_print_array($feedsParsed[0]->object_id);
+
+
+//labdoo_lib_print_array($feedsParsed);
+
+//echo facebook_pull_render("labdoo", "feed", "101911789903273", "082b6322e08d371e907cd097b4ce0b9e", Array ( "limit" => 10, "locale" => "en" ));
+
+
+
+
+
+}
+