开发者

Help accessing a fan page with Facebook SDK for iOS

I'm working on an app that uses the Facebook iOS SDK and I need some help. I want to post on a fan page and not on the user's wall.

When we do开发者_StackOverflow中文版

[facebook dialog:@"feed" andDelegate:self];

the user posts on his own wall. So I tried this:

[facebook dialog:@"/APPLICATION_ID/feed" andDelegate:self];

with no result. With the older API it was very simple, the following worked:

FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
    dialog.delegate = self;
    dialog.userMessagePrompt = @"Example prompt";

    dialog.targetId = @" APPLICATION_ID ";

Unfortunately, this property was removed in the current SDK.

The official documentation explains that we have to change the access_token but don't specify if we must take it for the user or the application, and doesn't explain how to do that.

I tried

[facebook requestWithGraphPath:@"/me/accounts" andDelegate:self];

but the result is an object containing empty data...

Is there something wrong with my code, and is there documentation that I'm unaware of for the iOS SDK?


You can use the dialog in the SDK, and specify the "to" parameter.

See http://fianbakken.com/wordpress/?p=272

for example on how to post to a fan page a user likes (same as a application page a user likes).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜