1 | /**
|
2 | * @name Instagram
|
3 | * @description Share a photo with the instagram app
|
4 | *
|
5 | * @usage
|
6 | * ```
|
7 | * import {Instagram} from 'ionic-native';
|
8 | *
|
9 | * Instagram.share('data:image/png;uhduhf3hfif33', 'Caption')
|
10 | * .then(() => console.log('Shared!'))
|
11 | * .catch((error: any) => console.error(error));
|
12 | *
|
13 | * ```
|
14 | */
|
15 | export declare class Instagram {
|
16 | /**
|
17 | * Detect if the Instagram application is installed on the device.
|
18 | *
|
19 | * @returns {Promise<boolean|string>} Returns a promise that returns a boolean value if installed, or the app version on android
|
20 | */
|
21 | static isInstalled(): Promise<boolean | string>;
|
22 | /**
|
23 | * Share an image on Instagram
|
24 | * Note: Instagram app stopped accepting pre-filled captions on both iOS and Android. As a work-around, the caption is copied to the clipboard. You have to inform your users to paste the caption.
|
25 | *
|
26 | * @param canvasIdOrDataUrl The canvas element id or the dataURL of the image to share
|
27 | * @param caption The caption of the image
|
28 | * @returns {Promise<any>} Returns a promise that resolves if the image was shared
|
29 | */
|
30 | static share(canvasIdOrDataUrl: string, caption?: string): Promise<any>;
|
31 | /**
|
32 | * Share a library asset or video
|
33 | * @param assetLocalIdentifier A local fileURI
|
34 | * @returns {Promise<any>} Returns a promise that resolves if the image was shared
|
35 | */
|
36 | static shareAsset(assetLocalIdentifier: string): Promise<any>;
|
37 | }
|