ShekarMudaliyar / social_share

Flutter package to share images/videos/text on social media
https://pub.dev/packages/social_share
MIT License
111 stars 186 forks source link

app name in instagram story #77

Open gulmensedat opened 3 years ago

gulmensedat commented 3 years ago

When I share any song on Instagram from within the spotify app, it says "play on spotify" at the top of the story and when I click it, it redirects to spotify. How can I do this for my own application. At the moment, I can do normal story sharing routing without any problems. But I couldn't find how to integrate the application name and link.

Sabatin commented 3 years ago

This package takes a screenshot of the screen and shares it on IG, what you want to do is much more complex. If I were you I would put, when the user shares, the app logo in a bottom or top corner, without being too invasive

naumanmir commented 2 years ago

@gulmensedat i think its a deep link. Did you try it with attribution url?

gulmensedat commented 2 years ago

@gulmensedat i think its a deep link. Did you try it with attribution url?

Yes, I tried, unfortunately it doesn't work.

FarhanSajid1 commented 2 years ago

yeah deep linking doesn't appear to work. How do we embed links on media that we share?

FarhanSajid1 commented 2 years ago

I looked into the underlying Instagram Api, and it seems they've removed the logic that used to set the attribution url: https://developers.facebook.com/docs/instagram/sharing-to-stories/#ios-developers

In the source code

            // Assign background image asset and attribution link URL to pasteboard
            NSArray *pasteboardItems = @[@{@"com.facebook.sharedSticker.stickerImage" : imgShare,
                                           @"com.facebook.sharedSticker.backgroundTopColor" : backgroundTopColor,
                                           @"com.facebook.sharedSticker.backgroundBottomColor" : backgroundBottomColor,
                                           @"com.facebook.sharedSticker.contentURL" : attributionURL, <- no longer does anything
                                           @"com.facebook.sharedSticker.appID" : appID}];
FarhanSajid1 commented 2 years ago

@gulmensedat as far as I know there isn't anything that can accomplish this anymore