I searched lots of thread but I couldn't find solution...
I checked my permissions. no problem.. and also passed developer.facebook stream test.. when I run my code, app ask my account info and ask for permissions.. and thats all. no message etc.. please help me what is wrong??
My code is:
Code:
-(IBAction)ShareFacebook:(id)sender{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:@"FBAccessTokenKey"]
&& [defaults objectForKey:@"FBExpirationDateKey"]) {
facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
}
if (![facebook isSessionValid]) {
NSArray *permissions = [[NSArray alloc] initWithObjects:
@"user_likes",
@"read_stream",
@"publish_stream",
@"user_photos",
@"user_videos",
nil];
[facebook authorize:permissions];
[facebook authorize:nil];
NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:7];
[variables setObject:@"#Your Message" forKey:@"message"];
[variables setObject:@"#http://Your Youtube Link" forKey:@"link"];
[variables setObject:@"#This is the bolded copy next to the image" forKey:@"name"];
[variables setObject:@"#This is the plain text copy next to the image. All work and no play makes Jack a dull boy." forKey:@"description"];
[variables setObject:@"#Your story" forKey:@"story"];
[variables setObject:@"#http://Your Youtube Link" forKey:@"source"];
[variables setObject:@"#Your caption" forKey:@"caption"];
[facebook requestWithGraphPath:@"/me/feed" andParams:variables andHttpMethod:@"POST" andDelegate:self];
}
so the first thing you have to do is to make the class that you have the ShareFacebook method on follow the FBDialogDelegate,FBRequestDelegate and FBSessionDelegate protocol like this:
where params is a NSMutableDictionary where you have parameters for the App ID, link URL, picture URL, name, caption, description and message for the dialog.
so the first thing you have to do is to make the class that you have the ShareFacebook method on follow the FBDialogDelegate,FBRequestDelegate and FBSessionDelegate protocol like this:
where params is a NSMutableDictionary where you have parameters for the App ID, link URL, picture URL, name, caption, description and message for the dialog.
but I dont want to see feed dialog page.. just I want to send some text and youtube links...
so the first thing you have to do is to make the class that you have the ShareFacebook method on follow the FBDialogDelegate,FBRequestDelegate and FBSessionDelegate protocol like this:
where params is a NSMutableDictionary where you have parameters for the App ID, link URL, picture URL, name, caption, description and message for the dialog.