Facebook iOS SDK - 使用Dialog进行简单的状态更新 [英] Facebook iOS SDK - Simple status update with 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:
- 请求
publish_stream
权限,而不是向Graph API发出POST
请求消息
参数(feed
连接用户
对象),请参阅状态
连接文档(IMO)似乎是一个很好的方法,如果你不害怕要求publish_stream
权限)。 - 打开Facebook应用程序与出版竞争w(和预填充文本?),这在回答如何以编程方式打开iOS Facebook应用程序与预填充状态?
- Requesting
publish_stream
permission and than issuePOST
request to Graph API withmessage
parameter (feed
connection ofuser
object), seestatuses
connection documentation (IMO it seems as an good way to go, if you don't afraid to askpublish_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屋!