You have to save your picture to the document directory, then use this kind of code:
function share\_on\_instagram(pFileName) local path = string.urlEncode(system.pathForFile( pFileName, system.DocumentsDirectory )) local url = "instagram://library?AssetPath="..path if system.openURL( url ) then -- OK ! else native.showAlert( "Instagram not available", "Instagram is not available on this device. You should install it first.", {"OK"} ) end end
EDIT:
You have to save the image to the camera roll and Instagram will open the library. It seems the path is ignored. Not the miracle I was thinking to…
