Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Mat Brummitt · Jan 24, 2010 at 12:11 PM · iphonefacebookleaderboard

(Unity iPhone) Help With Online Leaderboard Using Facebook Connect

Hi all,

I looked on the forum and nobody seems to have addressed this issue...

I want my game to have an online leaderboard utilising facebook connect so that I can show a player how he has scored compared with his facebook friends. I'm unsure of how to start implementing this within Unity.

I realise that i'll need to create a page or two on the web server in PHP to handle database inserts to store the high scores and user facebook id's, and also to make wall posts for users (informing friends of their new high score, as well as notifying other friends who play the game that their score has been beaten).

What I don't know how to do is add the facebook connect bit within Unity that will allow me to access a user's facebook data (friends list, profile pic etc), or how to submit a piece of data to the web server to store a user's score against their facebook ID... I also don't know how I go about getting the high scores INTO unity from the server? I was assuming i'd just have to have Unity goto a webpage in the background (www.domain.com/mygame/getscores.php?playerID=###) and this page would return a load of XML which unity would parse and then I have my scores ready to output into a nice looking leaderboard... I guess what i'm asking, is how you get Unity to make a server request?

Sorry this Q is a bit wordy, but hopefully someone can help.

Thanks

Mat

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Brian-Kehrer · Jan 24, 2010 at 05:27 PM

AFAIK facebook connect doesn't let you access user data from server requests, you have to actually visit (or embed) their javascript based login system thing, specifically to prevent automatic access of data. Take a look at their API - If there is a way to connect using server requests, I'd love to see it.

Here is the Objective-C iPhone facebook connect system Facebook Connect iPhone

To answer your question, I hope:

The Unity API classes you need to get and post data are WWW and WWWForm

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
avatar image
1

Answer by Ontario Britton · Mar 12, 2010 at 03:30 PM

I wrote a blog post yesterday on getting facebook connect working in a unity game, with sample code from start to finish. I was also thinking about how it would lead into a leaderboard system. That would be something good to add in an upcoming post.

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 AlucardJay · May 22, 2012 at 04:08 AM 0
Share

Hi, this blog link is broken :/

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

No one has followed this question yet.

Related Questions

LIKE button in iPhone game! 0 Answers

How to use Scores API? 0 Answers

Check to see if facebook user has logged into device 1 Answer

Leaderboard works on stand-alone but not when HTML? 0 Answers

Facebook SDK no longer supports Leaderboard? 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