I'm using the iOS Facebook SDK version 3.19 (the latest, at the time of writing). I'd like to use their "Direct message" dialog. I call the method:
[FBDialogs canPresentMessageDialog]
and after getting a YES
:
[FBDialogs presentMessageDialogWithLink:name:caption:description:picture:clientState:handler:]
(https://developers.facebook.com/docs/reference/ios/current/class/FBDialogs/)
The flow works correctly on an iPhone with iOS7/8 (dialog shown, message sent).
On an iPad (iOS7/8), the first method (canPresentMessageDialog
) consistently returns NO
. Even if I ignore it and call presentMessageDialogWithLink:name:...
either way, it has no effect. I have tested that on both iOS 7 and 8. Facebook and Messenger apps are installed and up to date.
I couldn't find any information about whether or not the Direct Message dialog is supported on iPad. In fact, their overview of iOS SDK dialogs (https://developers.facebook.com/docs/ios/ui-controls) does not mention the Direct Message dialog at all.
Am I missing something obvious? Or the Direct Message dialog is just not supported on an iPad?
There is an official statement from Facebook for that issue
"We currently don't support the message dialog on the iPad"
There's no official documentation of this, but I can confirm that canPresentMessageDialog always returns NO from the iPad while it works fine on the iPhone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With