Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Peter_Reflection · Oct 28, 2014 at 06:32 PM · facebooksocial

Facebook SDK feed dialog wrong orientation.

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.

Any help would be greatly appreciated.

Comment
Add comment · Show 9
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image larku · Dec 02, 2014 at 11:14 AM 0
Share

Did you ever find a solution for this?

avatar image ophilbert · Dec 02, 2014 at 11:26 AM 0
Share

It appears the current beta SD$$anonymous$$ (for more than a month) is still using the 3.17 version of Android and iOS Sdk.

https://developers.facebook.com/docs/unity/downloads

Your best shot is either to wait for a new SD$$anonymous$$ Version or modifying the current SD$$anonymous$$. I didn't try but maybe changing the files in Facebook/Editor/iOS and Facebook/Editor/Android will work. I currently don't have time to try myself but will be glad to hear from this.

avatar image keysosaurus · Dec 02, 2014 at 11:41 AM 0
Share

$$anonymous$$aybe I'm wrong but as far as I can tell the code you need to modify is contained within a library, so we don't have access to modify it.

I really wish they fixed this!!!!!

avatar image larku · Dec 02, 2014 at 12:27 PM 0
Share

Hey @keysosaurus, I found the same - it's all wrapped up in FacebookSD$$anonymous$$.a (static lib) so I'm pretty sure changing this myself is off the cards :(

Seriously Facebook, you couldn't find the resources to fix your own sdk!!

avatar image keysosaurus · Dec 02, 2014 at 12:31 PM 0
Share

It says on their sdk download page: "Please post feedback on Stack Overflow using the tag facebook-unity-sdk"

I've done so about a month ago but no reply from them yet! :-(

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by ophilbert · Nov 07, 2014 at 03:51 PM

Hi,

I struggled a moment with this bug before realizing there was nothing to do but wait or modifying the Facebook SDK yourself.

This bug was fixed in the iOS SDK version 3.18

Didn't have time to update for now but should be fixed for all by now. https://developers.facebook.com/docs/unity/change-log

alt text

Unfortunately the current Unity Sdk does not include this version. Neither does the 6.1 (currently in Beta)

alt text

Your best option is to wait for a fix if you're not in a hurry. Otherwise you should just modify the code yourself.

Hope that helps.

EDIT: Should now be fixed.Turns out Facebook just released a new version (v6.2.1) of their SDK using this time version 3.2 of their mobile SDK.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ophilbert · Feb 02, 2015 at 02:25 PM 0
Share

Turns out Facebook just released a new version (v6.2.1) of their SD$$anonymous$$ using this time version 3.2 of their mobile SD$$anonymous$$.

Didn't have time to update for now but should be fixed for all by now. https://developers.facebook.com/docs/unity/change-log

avatar image
1

Answer by larku · Dec 02, 2014 at 01:06 PM

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.

  • Go to https://developers.facebook.com/docs/ios/downloads and download facebook-ios-sdk-3.18.pkg

  • Run xar -x -f facebook-ios-sdk-3.18.pkg to extract the package

This will give you a folder called FacebookSDK.pkg

  • Change into the FacebookSDK.pkg folder

  • Run cat Payload | gunzip -dc |cpio -icat Payload | gunzip -dc |cpio -i

  • 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):

  • (version 3.18): http://www.filedropper.com/facebooksdk

  • (version 3.21): http://www.filedropper.com/facebooksdk-321 (Note as mentioned by @Dave1138 below, there may be issues using this version.)

Comment
Add comment · Show 10 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image keysosaurus · Dec 02, 2014 at 01:27 PM 0
Share

Any chance of a description for how to do it on a pc or mac?

avatar image larku · Dec 02, 2014 at 02:00 PM 0
Share

Hey @keysosaurus, I've added a link to download the needed file.

avatar image keysosaurus · Dec 06, 2014 at 03:36 PM 0
Share

works perfectly, thanks @larku!

avatar image Dave1138 · Dec 09, 2014 at 05:45 PM 0
Share

I tried this workaround using the 3.21 file. Seemed good on recent devices but consistently crashes at startup on iOS 5.x devices that were fine before the change. $$anonymous$$aybe still viable if not supporting such old versions, thanks for the post.

avatar image larku · Dec 10, 2014 at 01:32 AM 0
Share

Thanks for the feedback @Dave1138, I was concerned something like this may happen.

Have you tried the 3.18 workaround also? Was this more successful?

Show more comments
avatar image
0

Answer by Crism73 · Jan 09, 2015 at 11:39 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Get auth token after the login of twitter or facebook? 0 Answers

A node in a childnode? 1 Answer

Too Many heap Sections - on Building to Android 1 Answer

Facebook Integration for Android Game 1 Answer

Facebook Login restarts app on android 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges