- Home /
Facebook Connect for Android with Unity3D?
Hi, im want to make a facebook connect and Twitter using unity for android where i can post my score into the wall and twit. It was easy making it for iPhone but for android i had no idea. Any help?
http://answers.unity3d.com/questions/18980/android-with-facebook $$anonymous$$ight help? I'd expect you can use the WWW to do something... But I'd also think you'd have to do something with Facebook and Android, their coding wise, not all Unity... Good luck though.
i cant find the answer. it was easy for iPhone becoz i can access the XCode. but for android it directly build as apk file.
If you find an answer, please let me know henrique.vilela@gmail.com
Already find the solutions. Thanks for the help. the solution can be find here http://unity3d.com/support/documentation/$$anonymous$$anual/Android-Integrating%20Unity%20With%20Eclipse.html
Answer by handsomePATT · May 06, 2011 at 07:17 AM
you need to write java code and call it from in unity. its very complicated and has been giving me a headache the last couple days lol.
Can you give me an example how you solve this. I also do the same things for iPhone. Call XCode from Unity and it was easy because i can access the xCode. But for Android after i build the code it will build as final product .apk.
Already find the solutions. Thanks for the help. the solution can be find here http://unity3d.com/support/documentation/$$anonymous$$anual/Android-Integrating%20Unity%20With%20Eclipse.html
in other news, i found a million dollars. it was really hard to find, but wow, isn't it great! don't you wish you had some?
@codeZero given link shows page not found. Can you provide some help?
Answer by TomHunt · Aug 05, 2011 at 10:56 PM
1) git the Facebook Javascript SDK for Android to somewhere other than your Unity project: git clone git://github.com/facebook/facebook-android-sdk.git
2) Add a build.xml file to the root folder of the Facebook SDK:
<project name="myFBPlugin" default="dist" basedir=".">
<description>Facebook SDK</description>
<property name="src" location="src" />
<property name="bin" location="bin" />
<target name="jar">
<jar destfile="myFBPlugin.jar" basedir="bin/">
<include name="com/**" />
</jar>
</target>
</project>
3) Run "ant jar" on this project to compile the jar file
4) Get IKVM from here: http://www.ikvm.net/ ; install it; add to your PATH
5) Run "ikvmc myFBPlugin.jar -target:library" to get myFBPlugin.dll. It should be somewhere around 22-24k, depending on how you count your k
6) Drop myFBPlugin.dll, along with all the DLLs that come with IKVM into your Unity project assets folder (not the plugins folder)
7) Create a C# script in your Unity project using the facebook SDK to create accessors
using UnityEngine;
using com.facebook.android;
8) Integrate Facebook into your Unity Android app!
It's like an year old but I'm actually interested! So.. I've downloaded the fb sdk but the third point gave me the error BUILD FAILED, mydir\bin does not exist! in fact, there's no bin folder in my fb sdk... what should i do?
Answer by CodeZero2 · Apr 24, 2013 at 08:36 AM
Sorry for the late reply, i already left unity a long time ago. Maybe this link can help:
http://answers.unity3d.com/questions/173101/how-to-connect-unity-3d-to-eclips-android.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613121508im_/https://answers.unity.com/themes/thub/images/avi.jpg)