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.

4

1 に答える 1

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];
于 2012-06-06T20:41:07.513 に答える