0

I had integrated Facebook in my iphone app using Sharekit.

    NSURL *url = [NSURL URLWithString:@"http://www.mywebsite.com"];

    shareScore_ = [SHKItem URL:url title:@"Sample Post"];

    [SHKFacebook shareItem:shareScore_];

How can i change the icon in the Facebook "Post to Wall" view. Now the icon automatically displayed is the icon of my website http://www.mywebsite.com.

jay
  • 3,517
  • 5
  • 26
  • 44

1 Answers1

2

It is easy, if you use ShareKit 2.0.

NSURL *url = [NSURL URLWithString:@"http://www.mywebsite.com"];
NSString *pictureURI = @"http://www.mywebsite.com/picture.jpg";

shareScore_ = [SHKItem URL:url title:@"Sample Post"];
shareScore_.facebookURLSharePictureURI = pictureURI;

[SHKFacebook shareItem:shareScore_];

More info is in SHKItem.h and DefaultSHKConfigurator.m

If you are new to ShareKit 2.0, the install is quite different than original shareKit. Make sure, that you follow installation wiki carefully.

Vilém Kurz
  • 3,401
  • 2
  • 34
  • 43