Passing Global Variable value to Facebook - Gets NULL only
Posted
by Viral
on Stack Overflow
See other posts from Stack Overflow
or by Viral
Published on 2010-05-15T06:22:35Z
Indexed on
2010/05/15
6:34 UTC
Read the original article
Hit count: 217
hi all friends,
I am making a game application in that I want to pass my score on wall of face book. I've completed all the things (the log in and message passing part) but when I passes the score via global variable, I am getting only null as a value and not the score that I want.
Is there any way to pass data or string to Face book and write on a wall?
My code is
(void)viewDidLoad {
static NSString* kApiKey = @"be60415be308e2b44c0ac1db83fe486b"; static NSString* kApiSecret = @"4f880c7e100321f808c41b1d3c813dfa"; _session = [[FBSession sessionForApplication:kApiKey secret:kApiSecret delegate:self] retain];
score = [NSString stringWithFormat:@"%@",appDelegate.myTextView];
[_session resume];
[super viewDidLoad];
} whre score is NSString and myTextView is NSString in other viewcontrollerfile, And appDelegate is global variable.
Any help??
thanks in advance.
© Stack Overflow or respective owner