开发者

iphone post to facebook wall

I am trying to get my iPhone application to post a message to a user's facebook wall.

I have created a facebook app and specified the value of the kAppId in my iphone application.

When i test the iphone app in the simulator, i am prompted to authorize the facebook application, which i accept. however, i then immediately get the message "safari cannot open the page because the address is invalid".

I am trying to troubleshoot this error but am not really getting anywhere. Could it be because my facebook app currently shows: "Directory Status: Not Submitted" ? (I am not able to submit it to the facebook App Directory until i have 5 - 10 users.)

FYI - I have added a "publish to facebook" button in one of my vi开发者_Python百科ew controllers that responds with the following method:

-(IBAction) publishToFacebook {
  facebook = [[Facebook alloc] initWithAppId:kAppId];
  [facebook authorize:nil delegate:self];
  NSMutableDictionary* params = 
[NSMutableDictionary dictionaryWithObjectsAndKeys: kAppId, @"app_id", @"http://www.something.com/", @"link", @"http://www.something.com/something.jpg", @"picture", @"My App Name", @"name", @"The Caption...", @"caption", @"The description...", @"description", @"the message...", @"message", nil];
      [facebook dialog:@"feed" andParams:params andDelegate:self];
}


Thanks. Looks like i got this figured out. basically, just follow the instructions on developers.facebook.com/docs/guides/mobile/#ios) and be sure to prefix your app id with "fb" in the plist file (ex. fb123456789 where the facebook app id is 123456789)

Also, to answer my question, your facebook app does NOT need to be submitted to the directory for it to work with iPhone integration.


Did you update your info.plist file with your appid so it knows you to jump back to your app properly?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜