我使用的是 iOS Facebook SDK 版本 3.19(在撰写本文时为最新版本)。我想使用他们的“直接消息”对话框。我调用方法:
[FBDialogs canPresentMessageDialog]
在得到 YES
之后:
[FBDialogs presentMessageDialogWithLink:name:caption:description:picture:clientState:handler:]
( https://developers.facebook.com/docs/reference/ios/current/class/FBDialogs/ )
流程在装有 iOS7/8 的 iPhone 上正常工作(显示对话框,发送消息)。
在 iPad (iOS7/8) 上,第一个方法 (canPresentMessageDialog
) 始终返回 NO
。即使我忽略它并以任何方式调用 presentMessageDialogWithLink:name:...
,它也没有任何效果。我已经在 iOS 7 和 8 上进行了测试。Facebook 和 Messenger 应用程序已安装并且是最新的。
我找不到有关 iPad 是否支持直接消息对话框的任何信息。事实上,他们对 iOS SDK 对话框的概述 (https://developers.facebook.com/docs/ios/ui-controls) 根本没有提到直接消息对话框。
我是否遗漏了一些明显的东西?或者直接消息对话框在 iPad 上不受支持?
最佳答案
There is an official statement from Facebook for that issue
"We currently don't support the message dialog on the iPad"
关于ios - Facebook iOS SDK : can't show a "direct message" dialog on iPad (works on an iPhone),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26256068/