Hi, fixed it myself by altering a function in class-ifttt-instagram-gallery.php to this, to lose the url query. Probably a cleaner way…
public function load_instagram_image( $content_struct ) {
// Ingredients: Caption, Url, SourceUrl, CreatedAt, EmbedCode
$title = htmlspecialchars( $content_struct['title'] );
$description = $content_struct['description'];
$description_decoded = json_decode( $description, true );
$instagram_url = $this->get_final_url( $description_decoded['Url'] );
$parts = parse_url($instagram_url);
$instagram_url = $parts['scheme'].'://'.$parts['host'].$parts['path'];
$image_url = $this->get_final_url( $description_decoded['SourceUrl'] );
$parts = parse_url($image_url);
$image_url = $parts['scheme'].'://'.$parts['host'].$parts['path'];
$filename = $this->get_filename( $image_url );
$parts = parse_url($filename);
$filename = $parts['scheme'].'://'.$parts['host'].$parts['path'];
$response = wp_remote_get( $image_url );
$bits = $response['body'];
$this->upload_image( $filename, $title, $bits, $instagram_url );
$this->remove_old_images();
}
@peterbp: Thanks for your code. I released a new version yesterday. Your code helped me a lot and the problem should be fixed now.
{“Url”: {{Url}}”, “SourceUrl”:” {{SourceUrl}}”}
Is this correct or has it changed as its still up on the site
Dont worry I came across an easier option for my needs
1. Use pinterest to select instgram images you want and post them to a pinterest board
2. use Pinterest Importer to upload the images to your website
3. add the images to Contest Gallery
Clunky but works