Reputation: 11
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
[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?
Upvotes: 1
Views: 1008
Reputation: 4773
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).
Upvotes: 1