Jump to content

Search the Community

Showing results for tags 'facebook sdk'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hey, I'm currently working on a script that automates the import of certain Facebook posts. The script basically requests all the Facebook posts (combined with Images). It loops through all the posts and stores these within Processwire. I did this because I experience the Facebook API as very slow. I will run a Cronjob on this "hidden page" that imports the posts every 10-15 minutes. These posts are then loaded directly from Processwire so the API doesn't affect the loading speed of the page. I experience a minor issue that keeps me from importing all posts correctly. Some images (from the Facebook API) are given through some kind of "safe-image url" - like this: https://external.xx.fbcdn.net/safe_image.php?d=xxxxx&url=https://www.facebook.com/ads/image/?d=xxxxx Regular images (in comparison to this one) are given like this: https://scontent.xx.fbcdn.net/hphotos-xtp1/v/t1.0-9/s720x720/xxxxxx.jpg?oh=xxxxxx&oe=xxxxx Processwire has no problems with storing the images with the url as stated above this line. The "safe-images" however are causing some problems as I experience the following error: Error: Exception: Unable to copy: https://external.xx.fbcdn.net/safe_image.php?d=xxxx&url=https://www.facebook.com/ads/image/?d=xxx-xxxxx-xxxxx=> C:/wamp/www/abelle/site/assets/files/1335/d_aqksuwuaixz-djme44retrvs0th_wzpccib0ojqqb9lknelwusfkjvchyncx0pywb4q8k6iac9rf25kolvgy7nczw96myatyf8u6ap4gi2_cvdj-escwqhmb8dgb.com_ads_image__d_aqksuwuaixz_djme44retrvs0th_wzpccib0ojqqb9lknelwusfkjvchyncx0pywb4q8k6iac9rf25kolvgy7nczw96myatyf8u6ap4gi2_cvdj_escwqhmb8dgbafl1ikir_cs1gmmxhwwwfo_nlxez (in C:\wamp\www\abelle\wire\core\Pagefile.php line 117) I'm wondering if anyone has experienced this same problem before. I am using the following little script to store the image within the back-end of my project. foreach ($array["posts"] as $post): // Get the specific id $id = $post["id"]; // See if there is any pages with the ID yet $spider = $pages->find("title=$id"); if ($spider->count() != 1): // Set the counter echo "<li>$i: New record found</li>"; // Set all the information $new = new Page(); $new->template = "news"; $new->parent = $parent; $new->save(); // Parse the variables, check valid if needed $new->title = $post["id"]; $new->post_id = $post["id"]; // Check for these if (!empty($post["message"])): $new->post_message = $post["message"]; endif; // Check for these if (!empty($post["story"])): $new->post_title = $post["story"]; else: $new->post_title = $post["id"]; endif; // Declare the time $new->post_date = date_format($post["created_time"], "d-m-Y H:i:s"); // Check for these if (!empty($post["message"])): $new->post_message = $post["message"]; endif; // Check for these if (!empty($post["full_picture"])): // Grab the url $url = rawurldecode($post["full_picture"]); // Parse it to the backend $new->post_full_picture = $url; echo $url; endif; // Save the page $new->save(); else: // Set the counter echo "<li>$i: Original record found</li>"; endif; // Increment the counter $i++; endforeach;
×
×
  • Create New...