I am using the official facebook sdk 6.0.0 for unity in order to post a highscore to the player’s feed in my app for iOS.
I am able to post successfully to the feed, however the dialog that appears is always portrait, with the top of the dialog on the home button side of my iPad.
I am posting with the FB.Feed() method and I can successfully add a link and picture to the dialog, it’s just always the wrong way round.
I have the app set to landscape left in the player settings.
Is the feed dialog meant to automatically orientate to that of the app, or do I have to explicitly set it somewhere?
I can’t find anything relating to this in the facebook sdk reference.
I have an older app that includes the facebook sdk 5.1.0 which worked as expected in landscape mode on iOS 7, but since updating to iOS 8 the older app now has the same issue with the dialog being in the wrong orientation.
I am using Unity Pro 4.5.4 and Facebook sdk 6.0.0. I am also using Vuforia 3.0.9 in my app if that affects it in any way.
I’ve found a workaround/fix for this, very dodgy, but seems to work with the limited testing I’ve done so far. Kudos go out to @ophilbert for pointing out where the fix is to be found.
Steps I took (I’m using a Linux box so your steps may vary):
Note: this relates to version 6.0 of the Facebook SDK for Unity.
cd to Documents/FacebookSDK/FacebookSDK.framework/Versions/A/
Here you’ll find a file FacebookSDK with no extension - copy this and name it FacebookSDK.a and copy it over the FacebookSDK.a in the Facebook/Editor/iOS/FacebookSDK/FacebookSDK.a file in your Unity project.
Fixed the issue for me.
You may be game and use an even newer version Facebook iOS SDK - it may work, it may not
Remember, I’ve only done rudimentary tests on this, but it’s working for me, let me know if you find issues or have success!
Edit: If it helps here are the files I ripped out of that pkg (untouched):
Hi, I had the same problem and solved updating the Facebook SDK as described.
But I have another problem (I had to integrate a Unity game in landscape orientation inside another app in portrait orientation): now when the facebook login dialog appears, it’s correctly oriented in landscape, but if I rotate the phone in vertical, the login dialog (and ONLY the dialog, not the underlying game) gets portrait dimensions (width smaller than height) NOT rotating and goes offscreen.
Do you know if there is a way to “lock” the orientation for the facebook login dialog?
Thanks,
C.M.