Send Text Tag to Instagram using my Android app

前端 未结 3 1623
名媛妹妹
名媛妹妹 2021-01-05 14:39

My app takes pictures and sends it to Instagram, Facebook, and twitter but I need to share the text \"#myappname\" with the picture on Instagram.

Here\'s the code I

3条回答
  •  情深已故
    2021-01-05 15:17

    Finally, Instagram API supports text coming from Android apps using Intent.

    Here is the intent code to share images and text on Instagram.

    Intent shareIntent = new Intent(Intent.ACTION_SEND);
    shareIntent.setType("image/*");
    shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    shareIntent.putExtra(Intent.EXTRA_STREAM,uri);
    shareIntent.putExtra(Intent.EXTRA_TEXT,"YOUR TEXT TO SHARE IN INSTAGRAM");
    shareIntent.setPackage("com.instagram.android");
    return shareIntent;
    

    Here is the documentation

提交回复
热议问题