Twitter Integration in Cocos2d-iPhone
I am developing a game in which i have to post scores on my Facebook and
twitter a/c.
I have written this code but it not working. It's neither giving any error
nor any popup for posting something .
- (void) SLComposeViewControllerButtonPressed: (id) sender{
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
AppDelegate * myDelegate = (((AppDelegate*) [UIApplication
sharedApplication].delegate));
NSString *string = [NSString stringWithFormat:@"Just scored %d. ", 10];
SLComposeViewController*fvc = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeTwitter];
[fvc setInitialText:string];
[[myDelegate navController] presentViewController:fvc animated:YES
completion:nil];
}
Please give me valid solution of this problem.
No comments:
Post a Comment