ios - Open Graph Object books.book publishing fails -
ios - Open Graph Object books.book publishing fails -
i created object in developer app page , followed code shown in "get code". facebook user login went well, when started post test user account, got "cannot specify type in both path , query parameter" error message.
my code:
[fbrequestconnection startforuploadstagingresourcewithimage:myimage completionhandler:^(fbrequestconnection *connection, id result, nserror *error) { if (!error) { nsstring *urlofstagedimage = [result objectforkey:@"uri"]; if (urlofstagedimage) { nsmutabledictionary <fbgraphobject> *object = [fbgraphobject opengraphobjectforpostwithtype:@"books.book" title:@"my title" image:urlofstagedimage url:@"http://www.myurl.com" description:@"my description"]; [fbrequestconnection startforpostwithgraphpath:@"me/objects/books.book" graphobject:object completionhandler:^[fbrequestconnection *connection, id result, nserror *error) { if (!error) { // published. nslog(@"published"); } else { // show error. } }]; } else { // show error. } }];
i changed @"me/objects/books.book" @"me". there no error, message "published" displayed on console, post did not show on test user's timeline.
i cannot find problem code. help appreciated.
ios facebook facebook-graph-api
Comments
Post a Comment