Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook iOS SDK: can't show a "direct message" dialog on iPad (works on an iPhone)

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?

like image 617
kajot Avatar asked Oct 08 '14 11:10

kajot


2 Answers

There is an official statement from Facebook for that issue

"We currently don't support the message dialog on the iPad"

like image 171
ferus Avatar answered Oct 06 '22 05:10

ferus


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.

like image 45
Adamontherun Avatar answered Oct 06 '22 05:10

Adamontherun