开发者

Facebook Graph API call not working in iOS application

So I'm trying to write an iPhone application that allows a user to "Check-in" to a store using the Graph API method; something like

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
app_id, @"app_id",
@"111664535537155", @"place",
@"I just Checked Into A Retail Store", @"message", nil];

[appDelegate.facebook requestWithGraphPath:@"me/checkins" andParams: params     andHttpMethod:@"POST" andDelegate:self];

but I'm having no luck. I know I've setup the rest of the Facebook Connect stuff fine, since my dialog calls such as

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               app_id, @"app_id",
                     开发者_如何学Python          @"Facebook Dialogs", @"name",
                               @"Test Post", @"caption",
                               @"Check out my Test Post", @"message",
                               nil];


[appDelegate.facebook dialog:@"feed" andParams:params andDelegate:self];

works fine. According to This tutorial Facebook Connect supports Graph API calls, and the authentication should be enough.

Am I missing something? What should I try doing to fix this? I've taken a look at the other related questions on Stack Overflow, but none of the solutions seems to solve my problem.

Thanks


You also need to pass in the "coordinates" parameter. See https://developers.facebook.com/docs/reference/api/user/ and look for checkins


Did you prompt the user for "publish_checkins" extended permission?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜