xcode4.6 - How to add Social Framework in Xcode project? -
just starting learn xcode , lesson i'm supposed add social framework in xcode add twitter composer features.
so i'm following steps in book:
- i select project , target , go build phrases.
- i open link binary libraries , click + sign
- i social frameworks , click on add
- i can see social frameworks beneath project
- then i'm supposed go .m file , add code:
code:
slcomposeviewcontroller *composer = [slcomposeviewcontroller composeviewcontrollerforservicetype:slservicetypetwitter]; [composer setinitialtext:self.tweettextview.text]; [self presentviewcontroller:composer animated:yes completion:nil];
it shows 3 error signs saying : 'use of undeclared identifier: slcomposeviewcontroller'
. , project won't build.
have done wrong?
you need add:
#import <social/social.h>
to top of .m file you're using social framework api's.
i did chat.stackoverflow.com presentation on social framework , transcript here, and sample project can found on github.
Comments
Post a Comment