Facebook iOS SDK - 使用Dialog进行简单的状态更新 [英] Facebook iOS SDK - Simple status update with Dialog

查看:162
本文介绍了Facebook iOS SDK - 使用Dialog进行简单的状态更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Facebook iOS SDK上发布一个简单的状态更新。目前,如果我包含链接参数,一切都将起作用:

I'm trying to post a simple status update on the Facebook iOS SDK. At the moment, if I include the link parameter, everything will work:

NSMutableDictionary *params = 
[NSMutableDictionary dictionaryWithObjectsAndKeys:
                         @"Name here", @"name",
                         @"Caption here", @"caption",
                         @"Status update", @"description",
                         @"http://www.apple.com.",@"link",
                         nil];  

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

但是一旦我删除链接剩余的参数被确认,我留下一个空白信息。我只想执行与Facebook请求相同的类型的帖子,从而为消息提供一个字符串参数足以进行状态更新。

But once I remove link none of the remaining parameters are acknowledged and I'm left with a blank message. I simply want to perform the same sort of post you can achieve with Facebook request whereby providing a string for the message parameter is enough for the status update.

不知道我在哪里错了。

推荐答案

对话框不是一个选项,实际上并不是这样的用户。

Actually posing of status messages with feed dialog isn't an option and it's actually not intended to be user like this.

您可以考虑以下选项之一:

You can consider one of the options:

  • Requesting publish_stream permission and than issue POST request to Graph API with message parameter (feed connection of user object), see statuses connection documentation (IMO it seems as an good way to go, if you don't afraid to ask publish_stream permission).
  • Open Facebook App with publishing view (and text pre-filled?), this is described in answer to "How to programmatically open iOS Facebook app with pre-populated status?"

注意:我不是完全确定无法通过 feed 对话框实现这一点,所以我可能是错的,任何知道这一点的人不是这样,请纠正我。

Note: I'm not completely sure about inability to achieve this with feed dialog, so I may be wrong, anyone who know this isn't the case please correct me.

这篇关于Facebook iOS SDK - 使用Dialog进行简单的状态更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆