Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Applescript, the new Photos app and Instagram

I'm using applescript to add images to the new (Yosemite) Photos app. I'm using the following code:


tell application "Photos"

set ImageFile to POSIX file "~/photos/test.jpg"

set DestinationAlbumName to "Instagram"


if not (exists container named DestinationAlbumName) then

make new album named DestinationAlbumName

end if


import ImageFile into container named DestinationAlbumName with skip check duplicates

end tell

On the face of it this all works just dandy; album is created if it needs to be, image comes in fine. However, heading on over to Instagram, iphone of iPad, when I look for the image I've just added it's not there, nor is the album. It's in the Photos app on the phone and tablet, just Instagram refuses to see it.

If I add an album with an image in it by hand, Instagram sees it.

Apple have precious little to offer by way of examples on this, does anyone have anything to offer?

Thanks.

Posted on Apr 12, 2015 1:32 AM

Reply
5 replies

Apr 19, 2015 5:33 AM in response to mjsx

No, I understand that. What I'm saying is, I save the image to the created Instagram folder, wait a few moments for it to update the cloud. I then open Instagram, hit the button to add images from the Photo library and the Instagram folder isn't there - nor the image, obviously but I can see them if I browse in the iOS photos app. If I delete then create the folder by hand back on the Macbook where I ran the script, I can then see it when I browse the Photo library back in Instagram. If I add a new image by script I can't see the image browsing from Instagram but if I delete it then add by hand I can.


So basically, any image or folder added by script to Photos in OS X doesn't show up when you browse the Photos Library using Instagram but they do show up if you browse using the Photos app in iOS. After waiting a bit for the cloud to update, obviously.

Apr 20, 2015 8:43 AM in response to kim aldis

If I delete then create the folder by hand back on the Macbook where I ran the script, I can then see it when I browse the Photo library back in Instagram.



Try doing that and then running a script to get the properties of that folder.


tell application "Photos"


properties of containernamed "Instagram"

end tell



Look at the result. Then delete that folder, run your import script and create the folder, then get the properties again. Compare the two property lists. Is there any difference?

Apr 22, 2015 9:35 AM in response to softwater

Sorry, caught up in other things and haven't had a chance to check this. I will very soon. In the meantime, though, this seems to be working correctly on my iPad but not on my iPhone. I'm sitting here looking at Instagram image browsers on both an iPad and an iPhone. The iPad is showing the image I've just added using the above script, the iPhone isn't and probably never will. Both running current, up to date versions of both Instagram and iOS.

Apr 25, 2015 12:33 AM in response to softwater

Get Info with album "Test" created by script


{id:"aGp3Lse+SZ2380KuoqWSpA", class:album, name:"Test", parent:missing value}



Get Info with album "Test" created by script


{id:"XNhd4dFfSkGW65lgorvNEw", class:album, name:"Test", parent:missing value}

So no real difference there. It's still consistently working on the iPad, not working on the iPhone. I'm seeing this as an Apple or Instagram bug, for now I think I can live with working just on the iPad and I'll wait see if any fixes appear. I can't see it being that high on anyone's priority list but no biggie.

Thanks for your input.

Applescript, the new Photos app and Instagram

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.