Reputation: 4727
I am following the Facebook iOS tutorial. I'm trying to implement their code:
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Come check out my app.", @"message",
nil];
[facebook dialog:@"apprequests"
andParams:params
andDelegate:self];
The dialog appears, I add my friends, then I click "Send". At this point nothing appears to happen. My friends (test accounts) never receive the notification.
This delegate method is called:
-(void)dialogDidComplete:(FBDialog *)dialog
{
}
Any ideas as to why my friends aren't receiving the notifications?
In essence, what I am trying to do is get people to share this app with their friends. They click on the link and it opens the app in the iTunes app store. Should I be doing this a different way?
Upvotes: 1
Views: 1387
Reputation: 1863
Claudia is right. In the app settings you do need to fill-in the 'app on facebook' section and provide a canvas URL.
I guess the point is that if you don't do that there is nothing for facebook to direct an invited user to, so it doesn't display the request.
If your app is purely a mobile app then you could just create a simple webpage for the canvas which directs users to the app store.
Upvotes: 0
Reputation: 8449
This should work. Also make sure your app delegate is set up.
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
APP_ID, @"app_id",
URL_TO_SITE, @"link",
URL_TO_PIC, @"picture",
LINK_TITLE, @"name",
@" ", @"caption",
LINK_DESCRIPTION, @"description",
nil];
[facebook dialog:@"stream.publish"
andParams:params
andDelegate:self];
Upvotes: 0