0

On a recommendation I've added ShareKit to my app, I'd like to send the contents of a UILabel to Facebook. After trying

SHKItem *item = [SHKItem text:labelText];
[SHKFacebook shareItem:item];

It crashes with -[UILabel length]: unrecognized selector sent to instance 0x8279600

I've tested it out using simple text to make sure I didn't mess any of the installation up and it worked flawlessly.

I'm starting to think it's my code as I'm still learning.

Any thoughts?

Cheers.

mattFllr
  • 233
  • 7
  • 23

1 Answers1

2

You will need to send the text and not the UILabel So change the following

SHKItem *item = [SHKItem text:labelText];

to

SHKItem *item = [SHKItem text:labelText.text];
Omar Abdelhafith
  • 21,163
  • 5
  • 52
  • 56