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
0
Question by OWL7seven · Apr 16, 2014 at 05:11 PM · c#javascriptfacebookhighscores

how to intergrate facebook into a javascript based unity game for andriod

hi there. i have a bit of a problem, i ve been searching the web whole week for tutorials on how to implement facebook into my game.

the game is already complete but all i need is to have a leader-board system using facebook. i've downloaded friend smash and did the tutorial which is c#(which i understand a little, but when i get errors i m completely lost. they are not as easy to fix as javascript which i have more knowledge of)

ive been spending now most of my time looking how to put facebook into the game than on the game itself.

ive been on the facebook developer website and seen the videos which just demo's the sdk and doesnt really show how to do a step by step.

ive been on many forums and stil cant find anything thats helpful.

seeing that the facebook sdk is in c# i want to know if there is anyway to combine my jave script with facebook's c#? my score system uses playerprefs.

i looked at the facebook sdk example and tried to remove the extra things i don't need in the script but get lots of errors which i dont understand.

so please im looking for a complete step by step tutorial

i dont have money to by plugins

who ever helps me ill add your name and details in the credits on the game game is free so i m not gonna make money from it.

Comment
Add comment · Show 2
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 sumeetkhobare · Apr 17, 2014 at 12:03 AM 0
Share

I am looking up to do the same.. let's see, if i can find it.

avatar image OWL7seven · Apr 17, 2014 at 11:49 AM 0
Share

cool i ll do that too

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by OWL7seven · Apr 20, 2014 at 11:27 PM

ok i had to figure it out myself. C# is not really that much different from JS

in facebook sdk (interactive script, should be attached to the example scene)the first section is a bunch of functions and the second is the gui.buttons

now when the gui button is pressed it does a funtion which uses the functions on top that i spoke about.

now you remove all the buttons you dont need but be careful when doing so. {} is what will cause most of the errors so make sure when removing a button that its only that button funtion and its {}. taking the Int. function and putting in under the Void Start function will intialize facebook without you pressing the button(doing this you wont be able to run the app on your pc but it will work on your phone). you can try this all firstly by going to facebook developer and registering there then get creating your game and getting the code. from there you can put that code in to unity under the facebook tab that should pop up on top if you imported the sdk correctly.

from there just build the example scene and run it on your phone, mess around with it and and see what each button does.

should be: Friend invite Share app Screenshot and others

i messed around with this till i got it working

but im using google play services for my highscore board now its much easier. so if you got $25 to buy google deve account then rather do that. or i could upload for you if you want on my account (free games only).

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

20 People are following this question.

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

Related Questions

Distribute terrain in zones 3 Answers

Multiple Cars not working 1 Answer

C# to UnityScript conversion help. 0 Answers

Problem Javascript to C# 3 Answers

dealing with gameObject formations 1 Answer


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