AmeeJoshi
AmeeJoshi

Reputation: 201

Share image and caption to instagram via Android app

I want to share my application image and application title to instagram via my android application.

I have used below code for the same

            Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
            shareIntent.setType("image/*");
            shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            shareIntent.putExtra(Intent.EXTRA_STREAM, getImageUri(SearchCategory.this, imagebitmap));
            shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
            shareIntent.putExtra(Intent.EXTRA_TEXT, "YOUR TEXT TO SHARE IN INSTAGRAM");
            shareIntent.putExtra(Intent.EXTRA_TITLE, "YOUR TEXT HERE");
            shareIntent.setPackage("com.instagram.android");
            startActivity(shareIntent);

But this doesn't work.

The instagram application version is 7.11.0.

Please help for the same.

Upvotes: 1

Views: 4568

Answers (1)

PJunior
PJunior

Reputation: 2767

Since August 2015 that you can't.

Beginning today, the iOS Hooks and Android Intents will stop accepting captions passed by third party apps. (...) Instagram will ignore the caption text. To create a caption for a photo or video shared by a third party app, users will have to enter a caption manually, the same way they already do when sharing content using the Instagram native apps.

http://developers.instagram.com/post/125972775561/removing-pre-filled-captions-from-mobile-sharing

Upvotes: 2

Related Questions