Question

I have implemented the Social Framework in my app, but when sharing the url link via SLComposeViewController the web page thumbnail not showing. How to show the thumbnail?

Here is the code:

SLComposeViewController *fbSheetOBJ = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
    [fbSheetOBJ setInitialText:[NSString stringWithFormat:@"Everything you need to travel all in one app. Download %@ now!\nHelp you travel more.",[hiConfig AppName]]];
    [fbSheetOBJ addURL:[NSURL URLWithString:@"https://itunes.apple.com/us/app/hibali/id712909255?ls=1&mt=8"]];

for now it's look like this

no thumbnail

I want it to look like this (posting directly from facebook site)

with thumbnail

Était-ce utile?

La solution

So I think you have to remove the stuff at the end of the URL. Before:

[fbSheetOBJ addURL:[NSURL URLWithString:@"https://itunes.apple.com/us/app/hibali/id712909255?ls=1&mt=8"]];

After:

[fbSheetOBJ addURL:[NSURL URLWithString:@"https://itunes.apple.com/us/app/hibali/id712909255"]];

That should do the trick. Let me know. Cheers.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top