objective c - UIActivityViewController doesn't show FB and Twitter on iOS 7 -
i trying share items using uiactivityviewcontroller. on ios 6 works fine. when test on ios 7 mail icon shows up. in doubt sdk old downloaded recent one, it's still behaves same. tested on both simulator , device facebook installed on it, no luck.
now running out of ideas wrong.
here code
- (void)sharebuttonwastapped:(bmpopupmenuview *)popupmenu { nsstring *sharetext; if (_correctpatternfound) { sharetext = @"yey, solved puzzle!"; } else { sharetext = @"i solving photzle..."; } nsurl *shareurl = [nsurl urlwithstring:@"http://somewebsite.com"]; nsarray *items = [nsarray arraywithobjects: sharetext, _shareimage, shareurl, nil]; uiactivityviewcontroller *activityviewcontroller = [[uiactivityviewcontroller alloc] initwithactivityitems:items applicationactivities:nil]; [activityviewcontroller setvalue:sharetext forkey:@"subject"]; activityviewcontroller.excludedactivitytypes = @[uiactivitytypecopytopasteboard, uiactivitytypeposttoweibo, uiactivitytypesavetocameraroll, uiactivitytypecopytopasteboard, uiactivitytypemessage, uiactivitytypeassigntocontact, uiactivitytypeprint]; [self presentviewcontroller:activityviewcontroller animated:yes completion:nil]; }
they won't show when don't have twitter , facebook accounts set in settings. facebook or twitter app not enough - should have explicitly set accounts.
maybe it's not cool, (user may want share on fb or twitter , perform login it) apple considered these activities should work in ios 7.
Comments
Post a Comment