appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
193 stars 224 forks source link

Android `shareToInstagramFeed` function is pointing to wrong package name #135

Closed filipmaj1 closed 1 year ago

filipmaj1 commented 1 year ago

I was using this library and kept noticing that the Android app chooser kept popping up when the shareToInstagramFeed function was being called, rather than directly opening the Instagram Feed page.

Turns out there is a typo in the utils class:

private final String INSTAGRAM_PACKAGE = "com.instagram.android";

private final String INSTAGRAM_FEED_PACKAGE = "com.instagram.share.ADD_TO_FEED";

    public String shareToInstagramDirect(String text, Context activity) {
        return shareTextToPackage(text, activity, INSTAGRAM_PACKAGE);
    }

    public String shareToInstagramFeed(String imagePath, Context activity, String text) {
        return shareFileAndTextToPackage(imagePath, text, activity, INSTAGRAM_PACKAGE);
    }

I assume the second function should use INSTAGRAM_FEED_PACKAGE and not INSTAGRAM_PACKAGE.