ios - "Unexpected @ in program" when copying Facebook's Share Code -
ios - "Unexpected @ in program" when copying Facebook's Share Code -
i've copied code facebook's developer site integrate facebook sharing app:
nsmutabledictionary<fbgraphobject> *object = [fbgraphobject opengraphobjectforpostwithtype:@whatsyourinneragefb:inner_age title:@sample inner age image:@https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png url:@http://samples.ogp.me/578838518886846 description:@];; [fbrequestconnection startforpostwithgraphpath:@"me/objects/whatsyourinneragefb:inner_age" graphobject:object completionhandler:^(fbrequestconnection *connection, id result, nserror *error) { // handle result }];
however, "@" before @whatsyourinneragefb
produces error "unexpected @ in program
. also, lines such @https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png
have @https: in white, , rest highlighted green, though comment, sense wouldn't work if above error gone. so:
how can solve first error?
and
is code functional, or need tweaked work?
all help appreciated.
string literals in objective-c @"this"
.
so alter @sample inner age
@"sample inner age"
, example.
ios objective-c facebook
Comments
Post a Comment