Facebook iOS SDK: Cannot display “direct message” dialog on iPad (works on iPhone)

I am using the iOS version of Facebook version 3.19 (the latest at the time of writing). I would like to use their Direct Message dialog box. I call the method:

[FBDialogs canPresentMessageDialog]

and after receiving YES :

[FBDialogs presentMessageDialogWithLink:name:caption:description:picture:clientState:handler:]

( https://developers.facebook.com/docs/reference/ios/current/class/FBDialogs/ )

The stream works correctly on iPhone with iOS7 / 8 (a dialog is displayed, a message has been sent).

On an iPad (iOS7 / 8), the first method ( canPresentMessageDialog ) successively returns NO . Even if I ignore it and call presentMessageDialogWithLink:name:... in any case, it has no effect. I tested this on both iOS 7 and 8. Facebook and Messenger apps are installed and updated.

I could not find any information on whether the Direct Message dialog box is supported on the iPad. In fact, their review of the 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 is the direct message dialog simply not supported on the iPad?

+5
source share
2 answers

There is an official Facebook expression for this problem

"We do not currently support message dialogue on the iPad."

+5
source

There is no official documentation there, but I can confirm that canPresentMessageDialog always returns NO from the iPad while it works fine on the iPhone.

+3
source

Source: https://habr.com/ru/post/1204250/


All Articles